Question d’entretien chez Google

Dynamic programming question with a 2d array