C# || 11ms beat 100% but kinda simple tho
ApproachNow for every empty spot in result[ ] just fill in with vowels from vowels[ ] using pointer v. We will increment v once vowels[v] == 0.Code
# Approach
Now for every empty spot in *result[ ]* just fill in with vowels from *vowels[ ]* using pointer *v*. We will increment v once *vowels[v]* == *0*.

![10bc9327-b4c7-4456-80e1-798b26320cc8.jpg](https://assets.leetcode.com/users/images/fe5b31d1-d75d-4440-a273-caa9388118b9_1741599894.7953305.jpeg)


# Code
```csharp []
public class Solution {
    public string SortVowels(string s) {
        char[] result = new char[s.Length];
        int[] vowels = new int[53];

        for (int i = 0; i < s.Length; i++) {
            if (isVowels(s[i]))  vowels[s[i] - 'A']++;
            else  result[i] = s[i];
        }

        int v = 0;
        for (int i = 0; i < result.Length; i++) {
            while (v < vowels.Length && vowels[v] == 0)  v++;  // move to next vowel
            if (result[i] < 'A') {  // if spot is empty
                result[i] = (char)(v + 'A');
                vowels[v]--;  // decrease the quantity of the filled vowel
            }
        }

        return new string(result);
    }

    private bool isVowels(char c) {
        return (c is 'a' or 'A' or 'e' or 'E' or 'i' or 'I' or 'o' or 'O' or 'u' or 'U');
    }
}
```
['Array', 'C#']