Rod Cutting Dynamic Programming Leetcode