• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Quiz On Chessboard Problem

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?

  • 8

  • 12

  • 32

  • 92

Question 2

If a knight piece is placed on a chessboard, how many legal moves can it make in a single turn?

  • 6

  • 8

  • 10

  • 12

Question 3

Which of the following methods can be used to solve n-queen’s problem?

  •  Greedy algorithm

  • Iterative improvement

  • Divide and conquer

  • Backtracking

Question 4

What is the N-Queens problem?

  • Placing N queens on an N x N chessboard so that no two queens threaten each other. 

  • Placing N kings on an N x N chessboard so that they can capture each other.

  • Placing N queens on an N x N chessboard with no constraints.

  • Placing N pawns on an N x N chessboard so that they can reach the other side.

Question 5

What is the Knight's Tour problem?

  • A puzzle involving a knight in chess capturing other pieces. 

  • A puzzle involving a knight moving to every square on a chessboard exactly once. 

  • A puzzle involving placing knights on a chessboard without conflicts. 

  • A puzzle involving the longest path a knight can take on a chessboard.

Question 6

Which type of graph problem is the Knight's Tour problem an example of?

  • Shortest path problem

  • Traveling Salesman problem 

  • Graph coloring problem 

  • Hamiltonian cycle problem

Question 7

What is the output of the code below if the input is qX = 4, qY = 5, oX = 6, oY = 7 : 

C++
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;
}
  • True

  • 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.


 

  • 2

  • 4

  • 3

  • 5

Question 9

What is the total number of squares (including all sizes) on a standard 8x8 chessboard? 

  • 36

  • 64

  • 72

  • 128

Question 10

How will Queen move in the chess-board?

  • Diagonal

  • Forward

  • Backward

  • All of these

There are 10 questions to complete.

Last Updated :
Take a part in the ongoing discussion