Question d’entretien chez Amazon

basic 2d dp question same as leetcode