Skip to content

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

Start Your Coding Journey Now!