Backtracking algorithm full code