##
Mean and Median of a matrix
October 18, 2017

Given a sorted matrix of size n*n. Calculate the mean and median of the matrix . Examples: Input : 1 2 3 4 5 6… Read More »

October 18, 2017

Given a sorted matrix of size n*n. Calculate the mean and median of the matrix . Examples: Input : 1 2 3 4 5 6… Read More »

October 17, 2017

In linear algebra, a matrix decomposition or matrix factorization is a factorization of a matrix into a product of matrices. There are many different matrix… Read More »

October 15, 2017

In numerical analysis and linear algebra, LU decomposition (where ‘LU’ stands for ‘lower upper’, and also called LU factorization) factors a matrix as the product… Read More »

October 13, 2017

Given a matrix of N*M order. Find the shortest distance from a source cell to a destination cell, traversing through limited cells only. Also you… Read More »

October 12, 2017

A Magic Square is a n x n matrix of distinct element from 1 to n2 where the sum of any row, column or diagonal… Read More »

Given a matrix of size n x m consisting of 0’s and 1’s.We need to find number of unique cells with value 1 such that… Read More »

October 9, 2017

You are given a square matrix (matrix[][]) of order n, where matrix[i][j] = i*j. Find the number of cells which have entry equal to a… Read More »

October 8, 2017

A matrix is a two dimensional data objects having m rows and n columns, therefore a total of m*n values. If most of the values… Read More »

October 2, 2017

Given a matrix of N rows and M columns. From m[i][j], we can move to m[i+1][j], if m[i+1][j] > m[i][j], or can move to m[i][j+1]… Read More »

Given a square matrix, find out count of numbers that are same in same row and same in both primary and secondary diagonals. Examples: Input… Read More »

October 1, 2017

Given a m x n matrix mat[][] containing positive integers. The problem is to reach to the cell (m-1, n-1) from the cell (0, 0)… Read More »

Given a matrix of size N X M consisting of ‘#’, ‘.’ and ‘*’. ‘#’ means blocked path, ‘.’ means walkable path and ‘*’ means… Read More »

September 28, 2017

Given a square matrix of order n*n, we need to print elements of the matrix in Z form Examples: Input : mat[][] = {1, 2,… Read More »

September 26, 2017

Given a binary matrix. The problem is to find the largest area rectangular sub-matrix with equal number of 1’s and 0’s. Examples: Input : mat[][]… Read More »

September 24, 2017

Given a binary matrix of R rows and C columns. We are allowed flip to any size of sub matrix. Flipping means changing 1 to… Read More »