Solve N-Queens Problem
Given a chessboard of size , determine how many ways queens can be placed on the board, such that no two queens attack each other.
A queen can move horizontally, vertically, and diagonally on a chessboard. One queen can be attacked by another queen if it is present in the same row, column, or diagonal of that queen.
Below is a valid placement of queens on a chessboard. The on the board represents a square where a queen is placed: