## Sum of the count of number of adjacent squares in an M X N grid

Given an M × N matrix. The task is to count the number of adjacent cells and calculate their sum. Two cells are said to… Read More »

- Minimum time required to rot all oranges | Dynamic Programming
- Rat in a Maze Problem when movement in all possible directions is allowed
- Count number of ways to reach destination in a maze
- Maximum sum path in a matrix from top to bottom and back
- Minimum steps required to reach the end of a matrix | Set 2
- Number of shortest paths to reach every cell from bottom-left cell in the grid
- Find minimum steps required to reach the end of a matrix | Set - 1
- Count number of ways to reach destination in a Maze using BFS
- Find the number of paths of length K in a directed graph
- Find minimum steps required to reach the end of a matrix | Set 2
- Print a given matrix in spiral form using direction tracking method
- Maze With N doors and 1 Key
- 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
- Implementation of BFS using adjacency matrix
- Find the position of the given row in a 2-D array
- Find a sub matrix with maximum XOR
- Check if a cycle of length 3 exists or not in a graph that satisfy a given condition
- Check if the robot is within the bounds of the grid after given moves
- Number of ways to reach the end of matrix with non-zero AND value
- Queries to find the last non-repeating character in the sub-string of a given string
- Find a way to fill matrix with 1's and 0's in blank positions
- Find the number of p-sided squares in a grid with K blacks painted
- Find the original matrix when largest element in a row and a column are given
- Check if the rows of a binary matrix can be made unique by removing a single column
- Find if a binary matrix exists with given row and column sums
- Paths from entry to exit in matrix and maximum path sum
- C++ program to Convert a Matrix to Sparse Matrix
- Find the number of cells in the table contains X
- Maximise matrix sum by following the given Path

Given an M × N matrix. The task is to count the number of adjacent cells and calculate their sum. Two cells are said to… Read More »

Given a point (X, Y) in a 2-D plane and an integer K, the task is to check whether it is possible to move from… Read More »

Given a binary matrix of size N * M, the task is to find the largest area sub-matrix such that all elements in it are… Read More »

Breadth First Search (BFS) has been discussed in this article which uses adjacency list for the graph representation. In this article, adjacency matrix will be… Read More »

Depth First Search (DFS) has been discussed in this article which uses adjacency list for the graph representation. In this article, adjacency matrix will be… Read More »

Given a binary matrix mat[][] of size M * N. The task is to check whether the row of the matrix will be unique after… Read More »

Given a matrix of integers mat[][] of size N * M. The task is to find the maximum perimeter of a square in the matrix.… Read More »

Given two integers N and K, the task is to find an N x N square matrix such that sum of every row and column… Read More »

Given an array Arr of N integers representing the nodes of a graph. The edges are defined between those pair whose bitwise AND is not… Read More »

Given an integer N which is a multiple of 4, the task is to find an N x N grid for which the bitwise xor… Read More »

Given an N * N binary maze where a 0 denotes that the position can be visited and a 1 denotes that the position cannot… Read More »

Given a matrix with most of its elements as 0, convert this matrix to sparse matrix in C++ Examples: Input: Matrix: 0 1 0 0… Read More »

Given a maze with obstacles, count number of paths to reach rightmost-bottom most cell from the topmost-leftmost cell. A cell in the given maze has… Read More »

Given two number N and M. The task is to find the number of shortest paths to reach the cell(i, j) in the grid of… Read More »

Given a grid of size H*W with all cells initially white. Given N pairs (i, j) in an array, for each pair, paint cell (i,… Read More »