Ways to Express an Integer as Sum of Powers | Leetcode 2787 | Memoization | Tabulation