Software DesignData Structures & other objects using c++,third edition, Michael Main & Walter Savitch711QuestionDetails:Suppose that you have n queens from a chessboard. It ispossible to place all n queens on the board so that no two queensare in the smae row, no two queens are in the same column, and notwo queens are on the same diagonal?Please write a function that has one integer parameter, n, anddetermines whether there is a solution to the n-queensproblem. if a solution is found, then the procedure