Flipkart Interview Question

To traverse a matrix from one corner to another.