Skip to content

Category Archives: Matrix

Given a 4 x 4 matrix, the task is to interchange the elements of first and last columns and show the resulting matrix.Examples:   Input: 8… Read More
Given a grid of dimension M * N where each cell varies from 1 to 6 and each of the values present in the cell… Read More
Construct a matrix whose each row contains N 1’s and each column contains M 1’s. Examples: Input: N = 3, M = 4Output:1 1 11… Read More
Printing Boundary Elements of a Matrix. Given a matrix of size n x m. Print the boundary elements of the matrix. Boundary elements are those… Read More
Given two integers N and M that denotes the number of rows and columns of a matrix that is initially empty, the task is to… Read More
Given a matrix of dimension N*N whose all cells are initially 0. You are given Q queries, each of type {a, b, c, d} where… Read More
Given a matrix mat[][], the task is to find the sum of all the elements of the matrix. Examples: Input: mat[][] = {{1, 2, 3},… Read More
Given two integers N and M which denote the size of a matrix where initially all the cells are 0s. There are also K queries… Read More
There are N persons and N jobs. Given an array arr[] of size N*N where (arr[0], arr[1], . . ., arr[N-1]) denotes the time taken… Read More
Given two integers X and Y, which represent the number of rows and columns respectively of a matrix, the task is to check whether there… Read More
Given a binary matrix B[][] of size N*M, the task is to find a matrix A[][] of the same size such that B[i][j] is the… Read More
Given a matrix mat[][] of size N * M, and Q queries each of type {L, R} that denotes a range of row [L, R].… Read More
Given a matrix arr[][] of size M * N, where arr[i][j] represents the height of the cell (row, col). The task is to find a… Read More
Given a matrix mat[][] of size N * N (1 ≤ N ≤ 1000), the task is to find the number of pairs of rows… Read More
What is a Matrix? A matrix is a two-dimensional array that consists of rows and columns. It is an arrangement of elements in horizontal or… Read More

Start Your Coding Journey Now!