Citadel Interview Question

Leetcode DP problems on the hard level