1.

The problem of placing n queens in a chessboard such that no two queens attack each other is called as?(a) n-queen problem(b) eight queens puzzle(c) four queens puzzle(d) 1-queen problemI had been asked this question in an international level competition.The doubt is from Backtracking in division Backtracking of Data Structures & Algorithms II

Answer»

The correct ANSWER is (a) n-queen problem

The best explanation: The problem of placing n-QUEENS in a chessboard such that no two queens are VERTICAL or horizontal or diagonal to each other is an n-queen problem. The problem only EXISTS for n = 1, 4, 8.



Discussion

No Comment Found

Related InterviewSolutions