Practice · 2 of 5
Neighboring vowel pairs
CHALLENGE
Difficulty: beginner+25 XP
Implement int countVowelPairs(String s): count positions i where s.substring(i, i + 2) consists of two vowels (a e i o u, either case). Uses the substring-walk loop.
Press Submit to check your solution.
Back to lesson: Practice: String surgery