## Generate list of possible words from a character matrix

Given a M x N boggle board, find list of all possible words that can be formed by a sequence of adjacent characters on the the board.

## Ways to reach the bottom-right corner of a matrix with exactly k turns allowed

Given a M x N matrix, count number of different ways to reach the bottom-right corner of a matrix from its top-left corner with exactly K turns allowed and using only the directions right or down.

## Sort an array using Young tableau

In this post, we will see how to sort N2 numbers in increasing order using a N x N Young tableau in O(N3) time.

## Young Tableau | Insert, Search, Extract-Min, Delete, Replace

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 …

## Find the largest square sub-matrix which is surrounded by all 1’s

Given a binary matrix, find the largest square sub-matrix which is surrounded by all 1’s.

## Find index of the row containing maximum number of 1’s in a binary matrix

Given a binary M x N row-wise sorted matrix, find a row which contains maximum number of 1 in linear time.

## Find all common elements present in every row of given matrix

Given a M x N matrix, find all common elements present in every row.

## Collect maximum value of coins in a matrix

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 …

## Count all paths in a matrix from first cell to last cell

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.

## Print all shortest routes in a rectangular grid

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.

## Find length of longest path in the matrix with consecutive characters

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.

## Replace all occurrences of 0 that are completely surrounded by 1 in a binary matrix

Give a M x N binary matrix, replace all occurrences of 0 by 1 which are completely surrounded by 1.