left
at the start of the string (index 0) and right
at the end of the string (index len(s) - 1
).left
is less than right
:
a. Increment left
until s[left]
is a vowel.
b. Decrement right
until s[right]
is a vowel.
c. If both s[left]
and s[right]
are vowels, swap them.
d. Increment left
and decrement right
.