Easy

Quiz

#345 Reverse Vowels of a String

APPROACH

Given a string s, reverse only the vowels in it and return the result.

The vowels are 'a', 'e', 'i', 'o', and 'u', and they can appear in both lower and upper cases, more than once.

1 of 4
1:00

What is the optimal approach for this problem?