The problem we will examine in this chapter is a traditional puzzle, one that you may have encountered before or even written a program to solve. The problem is how to place eight queens on a chessboard in such a way that no queen can attack any other queen.
You will recall that a queen can move any number of spaces either horizontally, vertically, or along diagonals.