Leetcode 486 Csd Dynamic Programming