Reverse Vowels of a String

Easy · Arrays & Strings · about 10 minutes

Asked at Google, Amazon, Microsoft, Oracle, Bloomberg, Dell Technologies, SAP, Nutanix.

Given a string s, reverse only its vowels (a, e, i, o, u in either case) and return the result.

Related guides