X interview question

4 hard problems, probably leetcode dp, can't remember exactly