Skip to content

Instantly share code, notes, and snippets.

@bhakes
Last active August 20, 2019 17:44
Show Gist options
  • Save bhakes/517fb04fe2df05f1bf02b694b39ebe34 to your computer and use it in GitHub Desktop.
Save bhakes/517fb04fe2df05f1bf02b694b39ebe34 to your computer and use it in GitHub Desktop.

Challenge

Create a function that takes a String and reverses the order of all of the vowels in the String and returns the mutated String without passing through the string more than once. Your solution should have a time complexity of O(n).

Examples:

"Hello" -> "Holle"
"Ben Sean Kat Cam" -> "Ban Saan Ket Cem"

Here are the overall instructions for code challenges, if you need a reminder. Please create your own gist, don't comment on this one or you might inadvertently spoil the answer for other people. When you're done, submit your gist using this form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment