Constraint Search and Pruning
Checking a constraint at each placement prunes whole subtrees before they are explored.
Backtracking: 6 queens, the long way
Row 0, square (0, 0): no queen shares its column or a diagonal. Place a queen and move to row 1.
Cost
- Space
- O(depth)
Before this
Leads to
Topics that need this one first.
Taught by the same lesson
Backtracking covers these too, in the same run.