Question d’entretien chez Meta

Dynamic programming problem from Leetcode