Problem 2785 · Medium

Sort Vowels in a String

Collect the vowels, sort them by character code, and write them back into the vowel positions while consonants stay put.

Open the interactive visualisation