## Print all possible paths from top left to bottom right of a mXn matrix

The problem is to print all the possible paths from top left to bottom right of a mXn matrix with the constraints that from each… Read More »

- Sum of all Submatrices of a Given Matrix
- A variation of Rat in a Maze : multiple steps or jumps allowed
- Find sub-matrix with the given sum
- Search element in a Spirally sorted Matrix
- Minimum distance to the corner of a grid from source
- Unique paths covering every non-obstacle block exactly once in a grid
- Count number of ways to reach a given score in a Matrix
- Maximum sum path in a matrix from top to bottom and back
- Sum of bitwise AND of all submatrices
- Find the sum of the diagonal elements of the given N X N spiral matrix
- Minimum steps required to reach the end of a matrix | Set 2
- Sum of Bitwise-OR of all Submatrices
- Minimum operations of given type to make all elements of a matrix equal
- XOR of XORs of all sub-matrices
- Find minimum steps required to reach the end of a matrix | Set - 1
- Minimum time required to rot all oranges | Dynamic Programming
- Count the total number of squares that can be visited by Bishop in one move
- How to read a Matrix from user in Java?
- Number of submatrices with OR value 1
- Find minimum steps required to reach the end of a matrix | Set 2
- Rat in a Maze Problem when movement in all possible directions is allowed
- Number of submatrices with all 1s
- Maths behind number of paths in matrix problem
- Check if the robot is within the bounds of the grid after given moves
- Count possible moves in the given direction in a grid
- XOR of a submatrix queries
- Element in a matrix starting from which anti-clockwise traversal ends at the last element
- Find maximum path sum in a 2D matrix when exactly two left moves are allowed
- Find row with maximum and minimum number of zeroes in given Matrix
- Find the original matrix when largest element in a row and a column are given

The problem is to print all the possible paths from top left to bottom right of a mXn matrix with the constraints that from each… Read More »

Given a 2D matrix, print all elements of the given matrix in diagonal order. For example, consider the following 5 X 4 input matrix. 1… Read More »

Given a 2D array, find the maximum sum subarray in it. For example, in the following 2D array, the maximum sum subarray is highlighted with… Read More »

Given a boolean 2D matrix, find the number of islands. A group of connected 1s forms an island. For example, the below matrix contains 5… Read More »

About four months of gap (missing GFG), a new post. Given an M x N matrix, transpose the matrix without auxiliary memory.It is easy to… Read More »

Given a binary matrix, print all unique rows of the given matrix. Example: Input: {0, 1, 0, 0, 1} {1, 0, 1, 1, 0} {0,… Read More »

Given a boolean 2D array, where each row is sorted. Find the row with the maximum number of 1s. Example: Input matrix 0 1 1… Read More »

A magic square of order n is an arrangement of n^2 numbers, usually distinct integers, in a square, such that the n numbers in all… Read More »

Given a partially filled 9×9 2D array ‘grid[9][9]’, the goal is to assign digits (from 1 to 9) to the empty cells so that every… Read More »

In a party of N people, only one person is known to everyone. Such a person may be present in the party, if yes, (s)he… Read More »

Given a sequence of matrices, find the most efficient way to multiply these matrices together. The problem is not actually to perform the multiplications, but… Read More »

Given a cost matrix cost[][] and a position (m, n) in cost[][], write a function that returns cost of minimum cost path to reach (m,… Read More »

Given a boolean matrix mat[M][N] of size M X N, modify it such that if a matrix cell mat[i][j] is 1 (or true) then make… Read More »

Given a 2D array, print it in spiral form. See the following examples. Examples: Input: 1 2 3 4 5 6 7 8 9 10… Read More »

We have discussed Backtracking and Knight’s tour problem in Set 1. Let us discuss Rat in a Maze as another example problem that can be… Read More »