#3541

Find Most Frequent Vowel and Consonant

newbie · 100 · lc easy +12 · 89.3% accepted · 423 likes · top 99%

Description

Given lowercase string s, find the highest frequency among vowels (a, e, i, o, u) and the highest frequency among consonants.

Return the sum of these two maximum frequencies. If there are no vowels or no consonants, treat the missing category\'s maximum as 0.

Code

1
2
3