Try, check, undo, try again β see recursion think.
Place queens that cannot attack each other
O(N!) worst caseβ
Generate a maze, then solve it with DFS, BFS or A*
O(cells)β
Fill, check, undo
O(9^m) worst case (m = empty cells)β