##
Collect maximum points in a grid using two traversals
August 11, 2015

Given a matrix where every cell represents points. How to collect maximum points using two traversals under following conditions?

August 11, 2015

Given a matrix where every cell represents points. How to collect maximum points using two traversals under following conditions?

July 30, 2015

Given a matrix, clockwise rotate elements in it.

July 28, 2015

Given a 2D matrix and a set of cell indexes e.g., an array of (i, j) where i indicates row and j column. For every given cell index (i, j), find sums of all matrix elements except the elements present in i’th row and/or j’th column.

February 27, 2015

Given a rectangular matrix which has only two possible values ‘X’ and ‘O’. The values ‘X’ always appear in form of rectangular islands and these islands are always row-wise and column-wise separated by at least one line of ‘O’s.

February 13, 2015

Given a matrix where every row is sorted in increasing order. Write a function that finds and returns a common element in all rows. If there is no common element, then returns -1.

December 31, 2014

Given a matrix where every element is either ‘O’ or ‘X’, replace ‘O’ with ‘X’ if surrounded by ‘X’. A ‘O’ (or a set of ‘O’) is considered to be by surrounded by ‘X’ if there are ‘X’ at locations just below, just above, just left and just right of it.

December 22, 2014

Given a matrix where every element is either ‘O’ or ‘X’, find the largest subsquare surrounded by ‘X’.

December 16, 2014

In MS-Paint, when we take the brush to a pixel and click, the color of the region of that pixel is replaced with a new selected color. Following is the problem statement to do this task.

October 22, 2014

Given an n x n matrix, where every row and column is sorted in non-decreasing order. Print all elements of matrix in sorted order.

September 26, 2014

Given the mobile numeric keypad. You can only press buttons that are up, left, right or down to the current button. You are not allowed to press bottom row corner buttons (i.e. * and # ).

September 22, 2014

Given an n x n square matrix, find sum of all sub-squares of size k x k where k is smaller than or equal to n.