Sort an array of words based on the number of vowels. If two words have the same count, sort alphabetically.
HardProblem Statement
Sort an array of words based on the number of vowels. If two words have the same count, sort alphabetically.
Sample Input
['apple', 'banana', 'cherry', 'date']
Sample Output
["cherry", "apple", "date", "banana"]
Limits
Time: 2s · Memory: 256 MB