## Queries for bitwise OR in the given matrix

Given an N * N matrix mat[][] consisting of non-negative integers and some queries consisting of top-left and bottom-right corner of the sub-matrix, the task… Read More »

## Queries for bitwise AND in the given matrix

Given an N * N matrix mat[][] consisting of non-negative integers and some queries consisting of top-left and bottom-right corner of the sub-matrix, the task… Read More »

## Minimum steps required to reach the end of a matrix | Set 2

Given a 2d-matrix mat[][] consisting of positive integers, the task is to find the minimum number of steps required to reach the end of the… Read More »

## Sum of GCDs of each row of the given matrix

Given a matrix mat[][] of size N * N, the task is to find the sum of GCDs of all the rows of the given… Read More »

## Number of ways to reach the end of matrix with non-zero AND value

Given an N * N matrix arr[][] consisting of non-negative integers, the task is to find the number of ways to reach arr[N – 1][N… Read More »

## Find minimum steps required to reach the end of a matrix | Set 2

Given a 2d-matrix consisting of positive integers, the task is to find the minimum number of steps required to reach the end of the matrix.… Read More »

## Find minimum steps required to reach the end of a matrix | Set – 1

Given a 2d-matrix consisting of positive integers, the task is to find the minimum number of steps required to reach the end(leftmost-bottom cell) of the… Read More »

## Maximum sum path in a matrix from top to bottom and back

Given a matrix of dimension N * M. The task is find the maximum sum of path from arr to arr[N – 1][M – 1]… Read More »

## Check if it is possible to make two martices strictly increasing by swapping corresponding values only

Given two n * m matrices A[][] and B[][], the task is to make both the matrices strictly increasing (both rows and columns) only by… Read More »

## Check if the robot is within the bounds of the grid after given moves

Given a grid of size N X M and a robot is placed at cell (N – 1, M – 1). Also, given string str… Read More »

## Check if a number from every row can be selected such that xor of the numbers is greater than zero

Given a 2-D array of order N X M array elements, the task is to check if we can select a number from every row… Read More »

## Find the original matrix when largest element in a row and a column are given

Given two arrays A[] and B[] of N and M integers respectively. Also given is a N X M binary matrix where 1 indicates that… Read More »

## Check if matrix A can be converted to B by changing parity of corner elements of any submatrix

Given two binary matrices A[][] and B[][] of N X M. In a single operation, one can choose a sub-matrix (min of 2 rows and… Read More »

## Find a Symmetric matrix of order N that contain integers from 0 to N-1 and main diagonal should contain only 0’s

Given an integer N. The task is to generate a symmetric matrix of order N*N having the following properties. Main diagonal should contain only 0’s… Read More »

## Maximum sum of cocktail glass in a 2D matrix

Given a 2D matrix mat[][], the task is to find the maximum sum of a cocktail glass. A Cocktail glass is made of 6 cells… Read More »