C++ solution using Recursion + Memoization , Tabulation T.C => 0(n*k) S.C => O(n*k)
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(n*k)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(n*k)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Recursion + Memoization\n\n```\n#define ll long long\n#define mod 1000000007\n\nclass Solution {\npublic:\n    ll dp[101][101];\n    ll fun(vector<int>& v, int index, int k) {\n\n        if (index >= v.size()) {\n            if (k == 0)\n                return 1;\n            return 0;\n        }\n\n        if (dp[index][k] != -1)\n            return dp[index][k];\n        ll ans = 0;\n        if (v[index] <= k) {\n            ans = (ans % mod + fun(v, index + 1, k - v[index]) % mod) % mod;\n        }\n\n        ans = (ans % mod + fun(v, index + 1, k) % mod) % mod;\n        ans = (ans % mod + fun(v, index + 1, k) % mod) % mod;\n\n        return dp[index][k] = ans;\n    }\n\n    int sumOfPower(vector<int>& v, int k) {\n        memset(dp, -1, sizeof dp);\n        return fun(v, 0, k);\n    }\n};\n```\n\n# Tabulation\n\n```\n#define ll long long\n#define mod 1000000007\n\nclass Solution {\npublic:\n\n    int sumOfPower(vector<int>& v, int K) {\n        vector<vector<int>>dp(110,vector<int>(110,0));\n        int n = v.size();\nfor(int i=0; i<=n; i++){\n    dp[i][0]=1;\n}\n                for(int i=1; i<=n; i++){\n\n          for(int k=0; k<=K; k++){\nint ans = 0;\n        if(v[i-1]<=k){\n          ans = ans%mod + dp[i-1][k-v[i-1]]%mod;\n        }\n        ans = ans%mod+ dp[i-1][k]%mod;\nans = ans%mod+ dp[i-1][k]%mod;\n        dp[i][k]=ans%mod;\n          }\n        }\n\n\n        return dp[n][K];\n    }\n};\n```
['C++']