C++ || 2D VECTOR
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        vector<vector<int>> ch(26);\n        vector<int> a(s.size(),1);\n        for(int i=0;i<s.size();i++){\n            if(s[i]==\'*\'){\n                a[i]=0;\n                for(int j=0;j<26;j++){\n                    if(ch[j].size()>0){\n                        a[ch[j].back()]=0;\n                        ch[j].pop_back();\n                        break;\n                    }\n                }\n            } else{\n                ch[s[i]-\'a\'].push_back(i);\n            }\n        }\n        string ans="";\n        for(int i=0;i<s.size();i++){\n            if(a[i]) {\n                ans+=s[i];\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']