Category Archives: Matrix

BitMatrix is a two-dimensional array in which each element is either 0 or 1. We will implement a BitMatrix facilitating basic bit operations such asâ€¦ Read More
Given an integer K and a square matrix mat[][] of size N * N with elements from the range[1, K], the task is to countâ€¦ Read More
Given a matrix arr[][] of size N * M, the task is to print the boundary elements of the given matrix in a clockwise form.â€¦ Read More
Given the integers N, M, R and C where N and M denotes the number of rows and columns in a matrix and (R, C)â€¦ 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 2D square matrix arr[][] of dimensions N x N, the task is to find the maximum path sum by moving diagonally from anyâ€¦ Read More
Given a matrix B[][] of dimensions N * M, the task is to generate a matrix A[][] of same dimensions that can be formed suchâ€¦ Read More
Given two integers i and j, the task is to print the i * j thmatrix elements that can be obtained by filling the matrixâ€¦ Read More
Given a matrix, mat[][] of size N * M and two positive integers A and B, the task is to construct a matrix of sizeâ€¦ Read More
Given a binary matrix M[][] of dimensions N x N, the task is to make every pair of adjacent cells in the same row orâ€¦ Read More
Given a matrix arr[][] of size N * M, the task is to print the matrix after removing all rows and columns from the matrixâ€¦ Read More
Given a 2D matrix mat[][] of size N * M, the task is to find the median of Bitwise XOR of all possible submatrices fromâ€¦ Read More
Given a square matrix mat[][] of dimensions N * N, the task is to print the matrix that can be obtained after swapping the laterallyâ€¦ Read More
Given a matrix arr[][] of dimensions M * N, the task is to count the number of digits of every element present in the givenâ€¦ Read More
Given a matrix with N rows and M columns, the task is to find the minimum replacements required to make all rows and columns ofâ€¦ Read More