Citadel interview question

Leetcode DP problems on the hard level