Question 1
The "Eight Queens Puzzle" involves placing 8 queens on an 8x8 chessboard such that no two queens threaten each other. How many solutions are there for this problem?
Question 2
If a knight piece is placed on a chessboard, how many legal moves can it make in a single turn?
Question 7
What is the output of the code below if the input is qX = 4, qY = 5, oX = 6, oY = 7 :
bool canQueenAttack(int qR, int qC, int oR, int oC)
{
if (qR == oR)
return true;
if (qC == oC)
return true;
if (abs(qR - oR) == abs(qC - oC))
return true;
return false;
}
Question 8
Given a square chessboard of N*N size, the position of the knight and the position of a target are given as (1, 3) and (5, 0) respectively. Find out the minimum steps a knight will take to reach the target position.
Question 9
What is the total number of squares (including all sizes) on a standard 8x8 chessboard?
There are 10 questions to complete.