Number of distict Words with k maximum contiguous vowels
Hard Accuracy: 33.22%
Submissions: 663 Points: 8
Find the number of unique words consisting of lowercase alphabets only of length N that can be formed with at-most K contiguous vowels.
N = 1K = 0Output:
All 21 consonants.
N = 1K = 1Output:
All the english alphabets includingvowels and consonants.
You don't need to read input or print anything. Your task is to complete the function kvowelwords() which takes an Integer N, an intege K and returns the total number of words of size N with atmost K vowels. As the answer maybe to large please return answer modulo 1000000007.
Expected Time Complexity: O(N*K) Expected Auxiliary Space: O(N*K)