## Find probability of selecting element from kth column after N iterations

Given a matrix M of order N*M where Mij represent the occurrence of j in row i. The task is to find the probability of… Read More »

## Minimum steps required to convert X to Y where a binary matrix represents the possible conversions

Given a binary matrix of size NxN where 1 denotes that the number i can be converted to j, and 0 denotes it cannot be… Read More »

## Minimum elements to be added so that two matrices can be multiplied

Given two matrices A and B of order p x q (or q X p) and r x s ( or s X r). The… Read More »

## Count of matrices (of different orders) with given number of elements

Given a number N denotes the total number of elements in a matrix, the task is to print all possible order of matrix. An order… Read More »

## Count rows in a matrix that consist of same element

Given a matrix mat[][], the task is to count the number of rows in the matrix that consists of the same elements. Examples: Input: mat[][]… Read More »

## Print matrix after applying increment operations in M ranges

Given a 2-D matrix mat[][] of size N * N, initially all the elements of the matrix are 0. A number of queries(M ranges) need… Read More »

## Minimum distance to the end of a grid from source

Given a binary grid of order r * c and an initial position. The task is to find the minimum distance from the source to… Read More »

## Minimum Numbers of cells that are connected with the smallest path between 3 given cells

Given coordinates of 3 cells (X1, Y1), (X2, Y2) and (X3, Y3) of a matrix. The task is to find the minimum path which connects… Read More »

## Convert a String into a square matrix grid of characters

Given a string of length L. The task is to convert the string into a grid. No. of rows >= floor(√L) No. of columns <=… Read More »

## Print numbers in matrix diagonal pattern

Given an integer N, the task is to print the given pattern. Examples: Input: 3 Output: 1 2 4 3 5 7 6 8 9… Read More »

## Program to multiply two Matrix by taking data from user

Given two matrices, the task is to multiply them. The size and number of elements of matrices are to be read from the keyboard. Examples:… Read More »

## Print all paths from top left to bottom right in a matrix with four moves allowed

The problem is to print all the possible paths from top left to bottom right of an mXn matrix with the constraints that from each… Read More »

## Minimum steps to reach any of the boundary edges of a matrix | Set-2

Given an N X M matrix, where ai, j = 1 denotes the cell is not empty, ai, j = 0 denotes the cell is… Read More »

## Minimum steps to reach any of the boundary edges of a matrix | Set 1

Given an N X M matrix, where ai, j = 1 denotes the cell is not empty, ai, j = 0 denotes the cell is… Read More »

## Count columns to be deleted to make each row sorted

Given an array arr[] of strings of same length, the task is to count the number of columns to be deleted so that all the… Read More »