Pregunta de entrevista de Intuit

Dynamic programming question on matrix