##
Inplace (Fixed space) M x N size matrix transpose | Updated
October 16, 2012

About four months of gap (missing GFG), a new post. Given an M x N matrix, transpose the matrix without auxiliary memory.

October 16, 2012

About four months of gap (missing GFG), a new post. Given an M x N matrix, transpose the matrix without auxiliary memory.

September 28, 2012

Given a binary matrix, print all unique rows of the given matrix.

September 23, 2012

Given a boolean 2D array, where each row is sorted. Find the row with the maximum number of 1s.

July 25, 2012

A magic square of order n is an arrangement of n^2 numbers, usually distinct integers, in a square, such that the n numbers in all rows,

February 2, 2012

Given a sequence of matrices, find the most efficient way to multiply these matrices together.

October 30, 2011

Given a cost matrix cost[][] and a position (m, n) in cost[][], write a function that returns cost of minimum cost path to reach (m, n) from (0, 0). Each cell of the matrix represents a cost to traverse through that cell.

October 18, 2011

Given a boolean matrix mat[M][N] of size M X N, modify it such that if a matrix cell mat[i][j] is 1 (or true) then make all the cells of ith row and jth column as 1.

August 20, 2011

Given a 2D array, print it in spiral form. See the following examples.

March 10, 2011

Given an n x n matrix, where every row and column is sorted in increasing order. Given a number x, how to decide whether this x is in the matrix. The designed algorithm should have linear time complexity.

February 4, 2011

Given an image, how will you turn it by 90 degrees? A vague question. Minimize the browser and try your solution before going further.

April 4, 2010

Given a binary matrix, find out the maximum size square sub-matrix with all 1s. For example, consider the below binary matrix. We strongly recommend that you click here and practice it, before moving on to the solution. Algorithm: Let the given binary matrix be M[R][C]. The idea of the algorithm is to construct an auxiliary… Read More »