O(1) Time | O(1) Space - Discrete Math
Given that we have a sorted combinations problem, with respect to permutations, we can apply the Combinations With Repetitions formula:\n\n\n\nWhere n is our ob
Given that we have a sorted combinations problem, with respect to permutations, we can apply the *Combinations With Repetitions* formula:\n\n![image](https://assets.leetcode.com/users/images/b85a59ce-2ba5-4b5b-84ee-4bad83b4258d_1627068909.2655072.png)\n\nWhere n is our object (chars) and k is our repetition (4 vowels)\n\n```\nclass Solution {\n    public int countVowelStrings(int n) {\n        return ((n + 1) * (n + 2) * (n + 3) * (n + 4))/24;\n    }\n}\n```\n
[]