← All problemsSign in

3541. Find Most Frequent Vowel and Consonant

LeetCodeHash TableStringCountingOpen on judge ↗

You are given a string s consisting of lowercase English letters ('a' to 'z'). Your task is to: - Find the vowel (one of 'a', 'e', 'i', 'o', or 'u') with the maximum frequency. - Find the consonant (all other letters excluding vowels) with the maximum frequency. Return the sum of the two frequencies. Note: If multiple vowels or consonants have the same maximum frequency, you may choose any on

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start