##
Possible moves of knight
September 17, 2017

Given a chess board of dimension m * n. Find number of possible moves where knight can be moved on a chessboard from given position.… Read More »

September 17, 2017

Given a chess board of dimension m * n. Find number of possible moves where knight can be moved on a chessboard from given position.… Read More »

September 10, 2017

Given a matrix mat[][], we have to check if the sum of i-th row is equal to the sum of i-th column or not. Examples:… Read More »

September 9, 2017

Given a binary matrix (containing only 0 and 1) of order n*n. All rows are sorted already, We need to find the row number with… Read More »

September 6, 2017

You are given a 2D grid of values 0 or 1, where each 1 marks the home of someone in a group. And the group… Read More »

Given a grid of size n x len filled with lowercase characters. We can swap two adjacent characters in the same row and column. Now… Read More »

September 5, 2017

A square matrix is said to be symmetric matrix if the transpose of the matrix is same as the given matrix. Symmetric matrix can be… Read More »

Given a binary matrix whose elements are only 0 and 1, we need to print the rows which are duplicate of rows which are already… Read More »

September 2, 2017

You are given a 2-D array. We have to traverse each and every cell of given array by following the cell locations then return true… Read More »

September 1, 2017

Suppose A is at position (0, 0) of a 2-D grid containing ‘m’ rows and ‘n’ columns. His aim is to reach the bottom right… Read More »

August 28, 2017

Given a grid of size m * n, let us assume you are starting at (1, 1) and your goal is to reach (m, n).… Read More »

August 27, 2017

Given a 2D matrix, find the largest rectangular sub-matrix whose sum is 0. for example consider the following N x M input matrix Examples: Input… Read More »

August 26, 2017

Given a 2D square matrix, find sum of elements in Principal and Secondary diagonals. For example, consider the following 4 X 4 input matrix. A00… Read More »

August 25, 2017

Printing Boundary Elements of a Matrix. Examples: Input : 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8… Read More »

August 21, 2017

Given a matrix of size n*m, and a point P(c, r). Print the matrix in a spiral form(clockwise) starting from the point P. Examples: Input… Read More »

August 16, 2017

Given a matrix. Convert it into a linked list matrix such that each node is connected to its next right and down node. Example: Input… Read More »