Breadth-first and depth-first solutions to the N-puzzle (8 puzzle) problem.