recursion in this we have discovered that function calls and recursion are implemented internally using run time stack thusthe solution to any problem that requires the use of stack can be implemented using recursion in this sectionwe explore the well-known puzzle and classic recursion example known as the eightqueens problem the task is to place eight queens onto chessboard such that no queen can attack another queen in the game of chessa square board is used consisting of squares arranged in eight rows of eight columns each player has collection of playing pieces that move and attack in fixed ways the queen can move and attack any playing piece of the opponent by moving any number of spaces horizontallyverticallyor diagonallyas illustrated in figure figure legal moves of the queen in the game of chess for the eight-queens problemwe use standard chessboard and eight queens the objective is to place the eight queens onto the chessboard in such way that each queen is safe from attack by the other queens there are solutions to this problemtwo of which are shown in figure figure two solutions for the eight-queens problem