100% Faster
Liked it? Kindly Upvote \uD83D\uDE0A\u270C\n\nn = 1 -> dp = [ 1 , 2 , 3 , 4 , 5 ]\nn = 2 -> dp = [ 1 , 3 , 6 , 10 , 15 ]\n\nclass Solution {\npublic:\n    int c
***Liked it? Kindly Upvote*** \uD83D\uDE0A\u270C\n\n**n = 1 -> dp = [ 1 , 2 , 3 , 4 , 5 ]\nn = 2 -> dp = [ 1 , 3 , 6 , 10 , 15 ]**\n```\nclass Solution {\npublic:\n    int countVowelStrings(int n)\n    {\n        vector<int> dp(5 , 1);\n        for(int i = 0 ; i < n ; i++)\n        {\n            for(int j = 1 ; j < 5 ; j++)\n            {\n                dp[j] = dp[j - 1] + dp[j];\n            }\n        }\n        return dp[4];\n    }\n};\n```
[]