✅Multiple C++ Solutions 🚀
Code\n\n//Solution #1:\nclass Solution {\npublic:\n    int countVowelStrings(int n) {\n        int a=1, e=1, i=1, o=1, u=1;\n        while(--n){\n            o 
# Code\n```\n//Solution #1:\nclass Solution {\npublic:\n    int countVowelStrings(int n) {\n        int a=1, e=1, i=1, o=1, u=1;\n        while(--n){\n            o += u;\n            i += o;\n            e += i;\n            a += e;\n        }\n        return a+e+i+o+u;\n    }\n};\n\n//Solution #2\nclass Solution {\npublic:\n    int countVowelStrings(int n) {\n        vector<vector<int>>dp(n+1,vector<int>(5+1,0));\n        for(int i=1;i<=5;i++)dp[1][i]=i;\n        for(int i=2;i<=n;i++){\n            for(int j=1;j<=5;j++){\n                dp[i][j]= dp[i-1][j] + dp[i][j-1];\n            }\n        }\n        return dp[n][5];\n    }\n};\n\n//Solution #3\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```\n![upvote (3).jpg](https://assets.leetcode.com/users/images/1113c2da-2b1c-4bef-8dc9-c2d00cef4bb0_1679470498.667343.jpeg)\n
['C++']