Skip to main content

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.

Back to lesson: Practice: String surgery