Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 457 Bytes

File metadata and controls

15 lines (12 loc) · 457 Bytes

Problem 17: Selective Phoneme Inversion (Reverse Vowels of a String)

Problem Statement

Given a string s, reverse only all the vowels in the string and return it. The vowels are 'a', 'e', 'i', 'o', and 'u', and they can appear in both cases.

Input Format

  • A string s.

Example

Input: s = "hello"
Output: "holle" Input: s = "leetcode"
Output: "leotcede"

Vowels in "leetcode" are e, e, o, e. Reversing them: e, o, e, e.