Meta interview question

Dynamic programming problem from Leetcode