Given a string s, rearrange the vowels in s such that they are sorted in descending order based on their frequencies in s. Place the sorted vowels back into their original positions while keeping all consonant characters unchanged.
If multiple vowels have the same frequency, preserve their relative order of first appearance in the original string.
The vowels are 'a', 'e', 'i', 'o', and 'u'.
Constraints:
s.length
s consists of lowercase English letters.
Given a string s, rearrange the vowels in s such that they are sorted in descending order based on their frequencies in s. Place the sorted vowels back into their original positions while keeping all consonant characters unchanged.
If multiple vowels have the same frequency, preserve their relative order of first appearance in the original string.
The vowels are 'a', 'e', 'i', 'o', and 'u'.
Constraints:
s.length
s consists of lowercase English letters.