Skip to content

Category Archives: Matrix

Given a binary matrix arr[][] having N rows and M columns, the task is to calculate the minimum number of operations required to set the… Read More
Given a matrix grid[][] of size M * N where each cell of the matrix denotes the cost to be present on that cell. The… Read More
Given a square matrix M[][] of size N*N, the task is to reduce that matrix into a matrix of size N-1 * N-1 using the… Read More
Given a square matrix M[][] of size N x N, the task is to find the maximums & minimums of each of the rows and… Read More
Given an NxN square matrix M[][]. The task is to check whether the matrix M is a zero division matrix or not. A matrix is… Read More
Given a matrix arr[][] of size M*N containing only positive integers, the task is to check if every row contains all the integers from 1… Read More
Given a binary matrix of size M*N containing only 0 and 1. The task is to count the number of mappings in the matrix. There… Read More
The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in… Read More
Given a matrix mat[][] of size N*N, the task is to rotate the matrix by 45 degrees and print the matrix. Examples: Input: N =… Read More
Given three integers M, N and K, the task is to count all the possible paths from the cell (0, 0, 0) to cell (M-1,… Read More
Given a 2D matrix arr[] of size N*M, the task is to find the number of rows and columns having all primes. Examples: Input: arr[]=… Read More
Given an encoded (or encrypted) string S of length N, an integer M. The task is to decrypt the encrypted string and print it. The… Read More
Given an integer N and three N x N matrices X[][], Y[][], and Z[][], the task is to calculate the minimum cost required to reach… Read More
Given two points P1(x1, y1) and P2(x2, y2) of a matrix, the task is to find the minimum cost to reach P2 from P1 when:… Read More
Given a matrix of dimension N*M, the task is to maximize the total number of occupied cells in the given matrix such that they follow… Read More

Start Your Coding Journey Now!