DAA Viva Questions
DAA Viva Questions
2. Give the problem statement of the n-queens problem. Explain the solution.
The n-queens problem asks how to place n queens on an n × n chessboard so
that no two queens can attack each other. The solution involves placing queens
one row at a time and making sure that no two queens are in the same row,
column, or diagonal.
3. Write an algorithm for N-queens problem using backtracking.