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
Category Archives: 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
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
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
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
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… Read More
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… Read More
Given a matrix of dimension N * M. The task is find the maximum sum of path from arr[0][0] to arr[N – 1][M – 1]… Read More
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
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
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
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
Given two binary matrices, A[][] and B[][] of N×M. In a single operation, one can choose a sub-matrix (min of 2 rows and 2c columns)… Read More
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
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