A classic problem in CS where goal is to place N queens on a NxN chess board such that they do not attack each other by being in same row, column or diagonal.
We can place each queen in a different row, & then check if the square we are placing it in is safe due to previously placed queens. If there are no safe squares left, we can backtrack & return false.