Modified Priority_Queue Approach with very less lines...😁😁😁😁😁
Code\n\nclass Solution {\npublic:\n    struct comp {\n        bool operator()(const pair<char, int>& a, const pair<char, int>& b) const {\n            if (a.fir
# Code\n```\nclass Solution {\npublic:\n    struct comp {\n        bool operator()(const pair<char, int>& a, const pair<char, int>& b) const {\n            if (a.first == b.first) return a.second < b.second; \n            return a.first > b.first; \n        }\n    };\n    string clearStars(string s) {\n        priority_queue<pair<char, int>, vector<pair<char, int>>, comp> pq;\n\n        for (int i = 0; i < s.size(); ++i) {\n            if (s[i] != \'*\') pq.push({s[i], i});\n            else pq.pop();\n        }\n        vector<int> v;\n        while (!pq.empty()) {\n            v.push_back(pq.top().second);\n            pq.pop();\n        }\n        sort(v.begin(), v.end());\n        string res;\n        for (int i : v) res += s[i];\n        \n        return res;\n    }\n};\n\n```
['C++']