Simple Python Solution | Beginner Friendly | Priority Queue
Code


# Code
```python3 []
class Solution:
    def clearStars(self, s: str) -> str:
        s = list(s)
        heap = []
        for i in range(len(s)):
            if s[i] == '*':
                s[i] = ''
                if heap:
                    s[-heap[0][1]] = ''
                    heapq.heappop(heap)
            else:
                heapq.heappush(heap, (s[i], -i))
        
        return ''.join(s)       
```
['Python3']