Problem: Place queens so none attack each other.
Approach: Place one queen per row via backtracking. Track attacked columns with a set. Track diagonals using and (constant along each diagonal). Skip attacked positions.
Time: worst case, pruning reduces significantly.
Space: for sets and recursion.
See the implementation unit for code.