Given a matrix mat[][] whose elements are sorted both row-wise and column-wise. The task is to find the maximum sum of any submatrix from the… Read More

# Tag Archives: submatrix

Given an integer N, the task is to construct a matrix M[][] of size N x N with numbers in the range [1, N^2] with… Read More

Given a square matrix of size N*N using numbers 1 to N^2, the task is to find the maximum of minimums of each layer of… Read More

Given a number N, the task is to create a square matrix of size N*N with values in range [1, N*N], such that the sum… Read More

Given a matrix of size N x M and an integer X, the task is to find the number of sub-squares in the matrix with… Read More

Given an N*N binary matrix arr[][], the task is to check if the matrix contains a square of at least size 2 x 2 whose… Read More

Given a matrix mat[][] and two integers K and S, the task is to count all K x K sub-matrix such that the sum of… Read More

Given a Matrix arr[][] of size M x N having positive integers and a number K, the task is to find the size of the… Read More

Given a binary matrix mat[][] and an integer K, the task is to find the submatrix of size K*K such that it contains maximum number… Read More

Given a N x M matrix where N is the number of rows and M is the number of columns in the given matrix and… Read More

Given an N * M matrix mat[][], the task is to find the area-wise largest rectangular sub-matrix such that each column and each row of… Read More