✅C++ || DP Beats 100% 🚀 || (Memoization and Recursion)
Code\n\nclass Solution {\npublic:\n    int t(vector<vector<int>>&dp,int n,int i){\n        if(i==0){\n            dp[n][i]=0;\n            return dp[n][i];\n   
# Code\n```\nclass Solution {\npublic:\n    int t(vector<vector<int>>&dp,int n,int i){\n        if(i==0){\n            dp[n][i]=0;\n            return dp[n][i];\n        }\n        if(n==1){\n            dp[n][i]=i;\n            return dp[n][i];\n        }\n        if(dp[n][i]!=-1)return dp[n][i];\n        dp[n][i] = t(dp,n-1,i) + t(dp,n,i-1);\n        return dp[n][i];\n    }\n    int countVowelStrings(int n) {\n        vector<vector<int>>dp(n+1,vector<int>(5+1,-1));\n        t(dp,n,5);\n        return dp[n][5];\n    }\n};\n```
['Dynamic Programming', 'Combinatorics', 'C++']