Microsoft Interview Question

2D Dynamic programming usage in matrix