Intuition Explained || Java || O(nlogn)
IntuitionIf vowels are stores in sorted order of ASCII Values
at the time of appending they can be usedApproach
Initialise a Priority Queue(min heap) which stor
# Intuition
If vowels are stores in sorted order of ASCII Values 
at the time of appending they can be used 
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
- Initialise a Priority Queue(min heap) which stores vowels
- Start Building a string
  - If it is not a vowel append it directly
  - else poll from Priority Queue
- return the resultant string
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:$$O(nlogn)$$ 
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:$$O(n)$$ 
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```java []
class Solution {
    public boolean isvowel(char c){
        if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u'||c=='A'||c=='E'||c=='I'||c=='O'||c=='U')return true;
        return false;
    }
    public String sortVowels(String s) {
        PriorityQueue<Character> pq = new PriorityQueue<>((a,b)->Character.compare(a,b));
        for(int i=0;i<s.length();i++){
            if(isvowel(s.charAt(i))) pq.add(s.charAt(i));
        }
        StringBuilder sb = new StringBuilder();
        for(int i=0;i<s.length();i++){
            if(isvowel(s.charAt(i))){
                sb.append(pq.poll());
            }
            else sb.append(s.charAt(i));
        }
        return sb.toString();
    }
}
```
['String', 'Sorting', 'Heap (Priority Queue)', 'Java']