Given a binary matrix mat[][] of dimensions N*M, the task is to find the number of corner rectangles that can be formed. A corner rectangle… Read More

# Tag Archives: submatrix

Given a matrix mat[][] of dimensions N*M, the task is to find the size of the largest square submatrix such that the sum of all… Read More

Given a matrix arr[][] of size NxM and an integer K, the task is to find the count of square submatrices in the given matrix… Read More

Given a matrix mat[][] of size N x M and an array queries[] of size Q, containing (a, b) pairs. The task is to find… Read More

Given a matrix mat[][] of dimensions N * M, and an integer K, the task is to find the maximum sum of any rectangle possible… Read More

Given a positive integer N, the task is to construct a matrix of size N * N such that all the matrix elements are distinct… Read More

Given a binary matrix mat[][] of size M * N and Q queries of the form {pi, pj, qi, qj}, the task for each query… Read More

Given a 2D matrix mat[][] of size N * M and a positive integer K, the task is to find the area of the smallest… Read More

Given a matrix arr[][] of dimensions N * M, the task is to generate a matrix such that any cell (r, c) stores the sum… Read More

Given a 2D array, board[][] of size 9 × 9, which represents a solution to the Sudoku puzzle, the task is to check if the… Read More

Given a matrix m[][] of dimensions N × M and an integer K, calculate XOR(i, j) which is equal to the Bitwise Xor of all… 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