Final Matrix after incrementing submatrices by K in range given by Q queries
Given a 2D matrix mat[][] of size N*M and Q queries of the form {x1, y1, x2, y2, K}. For each query, the task is… Read More »
Given a 2D matrix mat[][] of size N*M and Q queries of the form {x1, y1, x2, y2, K}. For each query, the task is… Read More »
Given a binary matrix arr[][] of dimensions M x N and Q queries of the form (x1, y1, x2, y2), where (x1, y1) and (x2,… Read More »
Given two binary arrays A[] and B[], of length N and M respectively, the task is to find the number of rectangles of area K… Read More »
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 »
Given an integer N, the task is to construct a matrix M[][] of size N x N with numbers in range [1, N^2], such that… 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 MxN having positive integers and a number K, the task is to find the size of largest square sub-matrix… 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 »