## Sum of all Submatrices of a Given Matrix

Given a NxN 2-D matrix, the task to find the sum of all the submatrices. Examples: Input : arr[] = {{1, 1}, {1, 1}}; Output… Read More »

- Rotate a matrix by 90 degree in clockwise direction without using any extra space
- Matrix Chain Multiplication (A O(N^2) Solution)
- Find the number of distinct islands in a 2D matrix
- Minimum steps to reach any of the boundary edges of a matrix | Set-2
- Minimum steps to reach any of the boundary edges of a matrix | Set 1
- Kruskal's Algorithm (Simple Implementation for Adjacency Matrix)
- Print matrix in snake pattern from the last column
- Count the number of ways to traverse a Matrix
- Final cell position in the matrix
- Find number of Positional Elements
- Find number of cavities in a matrix
- Minimum cost to buy N kilograms of sweet for M persons
- Minimum distance to the end of a grid from source
- Interchange elements of first and last columns in matrix
- Print the matrix diagonally downwards
- Printing Matrix Chain Multiplication (A Space Optimized Solution)
- Find Nth term (A matrix exponentiation example)
- Program to print Spiral Pattern
- Check if the given chessboard is valid or not
- Prim's Algorithm (Simple Implementation for Adjacency Matrix Representation)
- Find alphabet in a Matrix which has maximum number of stars around it
- Minimum odd cost path in a matrix
- Find the largest area rectangular sub-matrix whose sum is equal to k
- Print numbers in matrix diagonal pattern
- Find maximum path length in a binary matrix
- Print all paths from top left to bottom right in a matrix with four moves allowed
- Unique paths covering every non-obstacle block exactly once in a grid
- Minimum sum falling path in a NxN grid
- Print matrix in zig-zag fashion from the last column
- Minimum queens required to cover all the squares of a chess board

Given a NxN 2-D matrix, the task to find the sum of all the submatrices. Examples: Input : arr[] = {{1, 1}, {1, 1}}; Output… Read More »

Given a spirally sorted matrix with N * N elements and an integer X, the task is to find the position of this given integer… Read More »

Given the source point and the destination point of the path and two integers x and y. The task is to check whether it is… Read More »

Given an N x N matrix and two integers S and K, the task is to find whether there exists a K x K sub-matrix… Read More »

Given the position of a Bishop on an 8 * 8 chessboard, the task is to count the total number of squares that can be… Read More »

Given the position of a Bishop and a Pawn on a 8 * 8 chessboard, the task is to check whether the Bishop can take… Read More »

Given a matrix of size NxN. The task is to count the number of pair of indices (i, j) such that the sum of j-th… Read More »

Given an N * N board which is initially empty and a sequence of queries, each query consists of two integers X and Y where… Read More »

Given 9 elements in a 3 x 3 matrix where the value of diagonals are 0. We need to find the values in diagonal to… Read More »

Given a grid grid[][] with 4 types of blocks: 1 represents the starting block. There is exactly one starting block. 2 represents the ending block.… Read More »

Given a N x M matrix which represents the number of rows and number of columns respectively. Each cell of a matrix is occupied by… Read More »

Given an integer K and a matrix of N rows and M columns, the task is to find the minimum number of operations required to… Read More »

Given a NxN matrix and an integer X. The task is to remove X rows and X columns from the NxN matrix. Remove first X… Read More »

Given a matrix mat[][] containing the characters [1 – 9], P and * where P is a person and * is an empty space. An… Read More »

Given an integer X and a square matrix mat[][], the task is to remove the first X rows and columns from the given matrix and… Read More »