the nqueen puzzle problem place n queen n x n chessboard queens attack otherGiven integer n return distinct solution nqueen puzzle you return answer ordereach solution contain distinct board configuration nqueens placement Q indicate queen space respectively Example 1input n 4Output QQQQQQQQExplanation there exist distinct solution 4queens puzzle show aboveexample 2input n 1output Q Constraints1 n 9