Easy sol^n
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    string clearStars(string s) {\n        unordered_map<char,vector<int>>mapping;\n        string ans;\n        for(int i=0;i<s.size();i++)\n        {\n            if(s[i]==\'*\')\n            {\n                for(int j=0;j<26;j++)\n                {\n                    if(mapping.find(\'a\'+j)!=mapping.end())\n                    {\n                         s[mapping[\'a\'+j].back()]=\'-\';\n                         mapping[\'a\'+j].pop_back();\n                         if(mapping[\'a\'+j].size()==0)\n                         mapping.erase(\'a\'+j);\n                         break;\n                    }\n                }\n            }\n            else\n            {\n               mapping[s[i]].push_back(i);\n            }\n        }\n        for(int i=0;i<s.size();i++)\n        {\n            if(s[i]!=\'*\'&&s[i]!=\'-\')\n            ans.push_back(s[i]);\n        }\n        return ans;\n    }\n};\n```
['Hash Table', 'C++']