Dsa
Strings
Hard
Reverse Vowels in a Sentence
Given a string sentence, reverse only the vowels in it. Vowels are 'a', 'e', 'i', 'o', 'u' (either case). For example,
Input: 'The quick brown fox jumps over the lazy dog'
Output: 'The qick brawn fox jamps uver thi lezy dog'
Key concepts
stringstwo-pointerin-place
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now