Google Interview Question

Dynamic programming question with a 2d array