Get Redundant Substrings
Data analysts at Amazon are building a utility to identify redundant words in advertisements.
They define a string as redundant if the length of the string, |word| = a * V + b * C, where a and b are given integers and V and C are the numbers of vowels and consonants in the string word.
Given a string word, and two integers, a, and b, find the number of redundant substrings of word.
Note: A substring is a contiguous group of 0 or more characters in a string. For example- "bcb" is a substring of "abcba", while "bba" is not.
Complete the function getRedundantSubstrings in the editor below.
Returns
int: the number of redundant substrings
1Example 1

2Example 2
Constraints
Limits and guarantees your solution can rely on.
1 ≤ |word| ≤ 10^5-10^3 ≤ a ≤ 10^3-10^3 ≤ b ≤ 10^3wordcontains lowercase English letters,[a-z].