A M x N Young tableau is an M x N matrix such that the entries of each row are in sorted order from left to right and the entries of each column are in sorted order from top to bottom. Some of the entries of a Young tableau may be infinity, which indicates an …
Given a binary matrix, find the largest square sub-matrix which is surrounded by all 1’s.
Given a binary M x N row-wise sorted matrix, find a row which contains maximum number of 1 in linear time.
Given a M x N matrix, find all common elements present in every row.
Given a M x N matrix where each cell contains a coin of some denomination, collect maximum value of coins by traversing the grid. The first traversal starts from the top-left corner of the matrix and end at the bottom-left corner and the second traversal starts from the top-right corner and end at the bottom-right …
Given a M x N rectangular grid, efficiently count all paths starting from the first cell (0,0) to the last cell (N-1,M-1) in the grid. We can either move down, or move towards right from a cell.
Given a M x N rectangular grid, print all shortest routes in the grid that start at the first cell (0,0) and end at the last cell (N-1,M-1). We can move down or right or diagonally (down-right) but not up or left.
Given a M x N matrix of characters, find the length of longest path in the matrix starting from a given character. All characters in the longest path should be increasing and consecutive to each other in alphabetical order.
Give a M x N binary matrix, replace all occurrences of 0 by 1 which are completely surrounded by 1.
Given a binary tree whose nodes are labelled from 0 to n-1, construct an ancestor matrix from it. An ancestor matrix is a boolean matrix, whose cell (i, j) is true if i is ancestor of j in the binary tree.
Given a M x N binary matrix, fill it with alternating rectangles of 0 and 1.
Given a square matrix, print maximum length snake sequence in it. A Snake sequence is defined as a sequence of numbers where each new number, which can only be located to the right or down of the current number, is either plus or minus one.