✅C++ Solution || No Heap || No Map
Complexity\n- Time complexity: O(n)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(n)\n Add your space complexity here, e.g. O(n) \n\n# Co
# Complexity\n- Time complexity: $$O(n)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(n)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution{\npublic:\n    string clearStars(string s){\n        int len = s.length();\n        vector<bool> include(len, true);\n        vector<vector<int>> indexes(26);\n\n        for(int i = 0; i < len; ++i){\n            if(s[i] == \'*\'){\n                include[i] = false;\n            \n                int j = 0;\n                while(j<26 && indexes[j].size()==0)\n                    ++j;\n                \n                if(j==26)\n                    continue;\n                \n                include[indexes[j].back()] = false;\n                indexes[j].pop_back();\n            }\n            else\n                indexes[s[i]-\'a\'].push_back(i);\n        }\n\n        string res = "";\n        for(int i = 0; i < len; ++i){\n            if(include[i])\n                res += s[i];\n        }\n\n        return res;\n    }\n};\n```
['C++']