1 line simple solution EXPLAINED | C++ | 100% faster
Since the order of alphabets has to lexicographic, the relative positions of all 5 vowels is fixed. The only thing we need to find is the count of occurence of 
Since the order of alphabets has to lexicographic, the relative positions of all 5 vowels is fixed. The only thing we need to find is the count of occurence of each vowel. Let us say the counts are x1,x2...,x5\nTherefore, x1+x2+x3+x4+x5 = n (All xi\'s>=0)\nThe number of ways for the above equation is (4+n)C(n) (I\'ve added the general formula below), which on simplifying becomes \n((n+1)*(n+2)*(n+3)*(n+4))/4!\n```\n int countVowelStrings(int n) {\n        return ((n+1)*((n+2)*((n+3)*(n+4))/2)/3)/4;\n  }\n  ```\n  The general formula when we have r non-negative integers which add upto an integer n is: (n+r-1)C(r-1)\n\n\t
[]