Knight's tour — backtracking

The knight must visit every square exactly once. At a dead end, the algorithm backtracks and tries another route.