Given a 2D array knights[][] of size N * 2, with each row of the form { X, Y } representing the coordinates of knights,… Read More

# Tag Archives: chessboard-problems

Given a 2D array queens[][] consisting of coordinates of N queens in an 8 * 8 chessboard and an array king[] denoting the coordinates of… Read More

Given two integers N and M denoting the dimensions of a chessboard, and two integers X and Y denoting the King’s position, i.e. the cell… Read More

Given an integers N such that there is a chessboard of size N*N and an array pos[][] of K pairs of integers which represent the… Read More

Given two integers N, M denoting N×M chessboard, the task is to count the number of ways a knight can reach (N, M) starting from… Read More

Given an integer N, the task is to construct a matrix M[][] of size N x N with numbers in the range [1, N^2] with… Read More

The N Queen is the problem of placing N chess queens on an N×N chessboard so that no two queens attack each other. For example, the… Read More

Given a matrix board[][] consisting of the characters K or k, Q or q, B or b, N or n, R or r, and P… Read More

Given an integer N and an array arr[] of positions which denotes the positions of already placed non-attacking rooks, the task is to find the… Read More

Puzzle | Minimum colors required to color a chessboard with no two given pair threatening each other

Puzzle: For each of the following chess pieces, find the minimum number of colors needed to color an N x N chessboard, such that no… Read More

Prerequisite: graphics.h, How to include graphics.h in CodeBlocks? In Computer Graphics, we use graphics.h which provide direct functions to draw different coordinate shapes(like circle, rectangle… Read More

Given an integer N denoting a N * N chess-board, the task is to count the number of ways to place two queens on the… Read More

Puzzle Is there a way for a chess knight to start at the top-left corner from a N x N chessboard, visit all the squares… Read More

Given an integer N which represents an N x N Square Matrix, the task is to print the number of ways to move from top… Read More

Given an N*M chessboard. The task is to find the maximum number of knights that can be placed on the given chessboard such that no… Read More