after picking up the queen in the first columnwe place it in the next position ( within that column we can now repeat the process and attempt to find open positions in each of the remaining columns these final stepswhich are illustrated hereresults in solution to the four-queens problem having found solution for the four-queens problemwe can use the same approach to solve the eight-queens problem the only difference between the two is that there is likely to be more backtracking required to find solution in additionwhile the four-queens problem has two solutionsthe eight-queens problem has solutions the original problem definition only considered finding solution for normal chessboard more general problemhoweveris known as the -queens problemwhich allows for the placement of queens on board of size where the same backtracking technique described earlier can be used with the -queens problemalthough finding solution to larger-sized boards can be quite time consuming we leave the analysis of the time-complexity as an exercise designing solution given the description of the eight-queens problem and the high-level overview of how to find solution to the four-queens problemwe now consider an implementation for solving this classic example of recursion and backtracking the board definition the implementation will consist of two partsa game board for placing the queens and recursive function for finding solution we begin with the definition of the nqueens board adt to represent the board and the placement of the queens