Dynamic Programming Questions Leetcode 150