Dynamic Programming Pattern Leetcode Solutions Cpp Compiler