Open harrytothemoon opened 3 years ago
var countVowelStrings = function(n) {
let ans = 0
function recursion(index, cur) {
if (cur === n) {
ans++
} else {
for (let i = index; i < 5; i++) {
recursion(i, cur + 1)
}
}
}
recursion(0, 0)
return ans
};