Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 846 Bytes

README.md

File metadata and controls

15 lines (10 loc) · 846 Bytes

Backtracking

The idea of this repo is just to show some backtracking algorithms that I have implemented to resolve common problems, like resolving a Sudoku, Queens problem, 8 Knight problem, and a rat in a maze.

I'll assume that everyone knows Sudoku, so I'll just explain the other three:

Queens problem:

This problem is a well known problem, and it consists in locating 8 queens in a chess board where none of them can attack each other with only one movement.

Knight's tour problem

The problem is to find whether a knight can visit all the squares in a board making only the kind of movement a chess knight can do (L movement)

Rat in a maze

We are in a maze and using this algorithm we need to find the way out of the maze.

I've not invented this algorithms nor the problems, I just wanted to make an implementation of them