Traversing a matrix in spiral order
Given a Matrix, write a function that will print the elements in spiral order. For example, if the Matrix is as below: Then the output should be: 1, 2, 3, 4, 8, 12, 16, 15, 14, 13, 9, 5, 6, 7, 11, 10
Minimum path sum in a matrix
Given a Matrix of positive integers and 2 cells A & B. You have to reach from A to B covering cells such that the sum of elements in path is minimum. You can travel in forward, downward and diagonally. For example: If the given Matrix is as below: 1 2 3 4 8 2 […]