C++| Intuitive Solution | DP and Memoization
Logic :\nThis problem is based on simple pick and non-pick concept. At every index we have a choice either to pick a vowel or skip it. So, here we get the idea 
**Logic :**\nThis problem is based on simple pick and non-pick concept. At every index we have a choice either to pick a vowel or skip it. So, here we get the idea of recursion, but while doing so we encounter overlapping problems and hence we go for the memoization part.\n\n```\nclass Solution {\npublic:\n    int solve(int i,int sz,vector<vector<int>> &dp)\n    {\n        if(i<0)\n        return 0;\n        if(sz==0)\n        {\n            return 1;\n        }\n        \n        if(dp[i][sz]!=-1)\n        return dp[i][sz];\n        \n        int l = solve(i,sz-1,dp);\n        \n        int r = solve(i-1,sz,dp);\n          \n        return dp[i][sz] = l + r;\n    }\n    int countVowelStrings(int n) {\n        \n        vector<vector<int>> dp(5,vector<int> (n+1,-1));\n        return solve(4,n,dp);\n    }\n};\n```\n\nIf this solution helps you then,  **Please Upvote!!**
['Dynamic Programming', 'Recursion', 'Memoization', 'C', 'C++']