# Category Archives: Matrix

Given an N×N Matrix Mat[][] of N rows and N columns. There is exactly one Queen on the chessboard and the cell that is under… Read More
Given an 8 X 8 matrix of characters ‘*’ and ‘K’  as a chessboard in which K represents the position of the King and the… Read More
Given an matrix mat[][] of size N*N (N > 2) such that mat[i][j] = arr[i]*arr[j] (where arr[] is a N sized array that is not… Read More
Given a character matrix consisting of O’s and X’s, find the number of submatrices containing only ‘X’ and surrounded by ‘O’ from all sides.  Examples:… Read More
Given a matrix of size N*M, the task is to find the product of all possible pairs of (i, j) where i and j are… Read More
Given an undirected graph with V vertices in the form of an adjacency matrix, the weight of any two edges cannot be the same. For… Read More
Given a matrix Mat of size N x M, the task is to find all the pairs of rows and columns where the sum of… Read More
Given an N×N matrix mat[][] and an integer K, the task is to search K in mat[][] and if found return its indices. Examples: Input:… Read More
Given a matrix of size N * N containing only 0s and 1s, where 0 represents white and 1 represents black. The task is to… Read More
Given a matrix mat of N*N (N is a perfect square|) and two points x and y, the task is to return all the elements of the… Read More
Given a binary matrix Mat[][] of size N*N, the task is to find the minimum number of flips to be performed such that the matrix… Read More
A Data Structure organizes and stores data in a computer so that we can perform operations on the data more efficiently. There are many diverse… Read More
Given two numbers M and N denoting the number of rows and columns of a matrix A[] where A[i][j] is the sum of i and… Read More
Consider a series of buildings in a 2-D square plot with different heights and only those buildings are chargeable that have a clear and straight… Read More
Given a matrix mat[][] of size N*M and the destination (x, y) to be reached from (0, 0), the task is to find if you… Read More