[Javascript] Math O(1)
Choose how many vowels will be used (1~5)\n2. Get all sets of possible (k-1) converting points C(n-1, k-1) where k is the number of used vowels.\n\nSince there 
1. Choose how many vowels will be used (1~5)\n2. Get all sets of possible `(k-1)` converting points `C(n-1, k-1)` where `k` is the number of used vowels.\n\nSince there are 5 vowels at most, the time complexity is O(1)\n\nFor example, if given n = 6, there are 5 cases:\n\n1. Choose 1 vowel: 5 cases only;\n2. Choose 2 vowels:\nThere are `C(5,2) = 10` types of vowel combinations could be choose. Lets choose `a` and `i` as example.\nOne case is `a-a-a-a-i-i`. From this case, there is **only one converting point to change `a` to `i`**. There are `n-1 = 5` candidates to be converting point, so the total number of possible strings is `C(5,2)*C(5,1)=50`;\n3. Choose 3 vowels:\nTake `a-a-e-i-i-i` as example. We have to **choose 2 positions as converting points** to convert `a->e` and `e->i` respectively. That is, `C(n-1, 2) = C(5, 2) = 10`.\nSo the total possible number in this case is `C(5,3)C(n-1,2) = 100`\n4. Choose 4 vowels: `C(5,4)C(n-1,3) = 50`\n5. Choose 5 vowels: `C(n-1,4) = 5`\n\nSum of the 5 cases = `5+50+100+50+5 = 210`\n\n```\nvar countVowelStrings = function(n) {\n    return 5 + 10 * combination(n-1, 1) + 10 * combination(n-1, 2) + 5 * combination(n-1, 3) + combination(n-1, 4);\n};\n\nfunction combination(n, k) {\n    if (k === 1)\n        return n;\n    \n    return combination(n-1, k-1)*n/k;\n}
['Math', 'JavaScript']