[C++] Clean O(n) code & Detailed Explanation
When n = 1\na e i o u\n1 1 1 1 1\n\nWhen n = 2\naa \nae ee\nai  ei   ii\nao eo io oo\nau eu iu  ou uu\n5  4  3   2   1\n\nWhen n = 3\nYou might realise, the # o
**When n = 1**\n`a e i o u`\n`1 1 1 1 1 `\n\n**When n = 2**\n`aa` \n`ae ee`\n`ai  ei   ii`\n`ao eo io oo`\n`au eu iu  ou uu`\n`5  4  3   2   1`\n\n**When n = 3**\nYou might realise, the # of three letter sequences begin as `aaa` and ends as `auu`, is exactly the same as the **sum** of all possible two letter sequences.\nShown here `aaa...auu` = `a` + `(aa...au,ee...eu,ii...iu,oo...ou,uu)` = 5 + 4 + 3 + 2 + 1 = 15\n\n\nThis actually applies to # of three letter sequences begin as `eee` and end as `euu` as well!\n`eee...euu` = `e` + `(ee...eu,ii...iu,oo...ou,uu)` = 4 + 3 + 2 + 1 = 10\n\nAnd for `iii...iuu`, `ooo...ouu`,` uuu` you gussed it!\n6 (3+2+1), 3 (2+1), and 1 (1) correspondingly\n\nThe final result will be\n`15 10 6 3 1`\n\n**When n = 4**\nYou can apply the same logic\nSince `aaaa` to `auuu` is same as `a` + `(aaa...uuu)`\n\nThe final result will be\n35 (15+10+6+3+1) 20 (10+6+3+1) 10 (6+3+1) 4 (3+1) 1 (1) or\n`35 20 10 4 1`\n\n**When n = 5**\nSame method and it gives\n`70 35 15 5 1`\n\nWe can now conclude an algorithmic pattern.\nFor a list `P`, 0-indexed. \n`P_0` represents the # of sequences length `n` begin with the letter `u`\n`P_1` represents the # of sequences length `n` begin with the letter `i`\n...\n`P_4` represents the # of sequences length `n` begin with the letter `a`\n\nTo find the # of sequences length `n+1`\nIt can be computed as follows, `0 <= i <= 4`\n`P_i = P_i + P_i-1 + ... + P_0`\n\nHere is the code I wrote in C++\n```class Solution {\npublic:\n    int countVowelStrings(int n) {\n        vector<int> sums(5,1);\n        \n        for (int i = 0; i < n; i++){\n            for (int j = 1; j < 5; j++){\n                sums[j] = sums[j] + sums[j-1];\n            }\n        }\n        \n        return sums[4];\n    }\n};\n```\n\nThis is actually my first post with explanations!\nFeedbacks welcomed!\n
[]