This is the first backtracking algorithm I've implemented. It finds all unique (up to rotation, transposition, mirroring, etc) solutions to the following problem:

Place 8 queens on a standard chess board such that no queen is threatening any other queen. It's gotten a lot more messy since I profiled and optimized it, but the basic approach is a breadth-first search over all possible boards. At every placement, a board state is tested to see if is a valid partial solution; if not, it is eliminated from the search tree.