Hash Table || O(N*26)
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: O(N*26)\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 {\n    fun clearStars(str: String): String {\n        var s: MutableList<Char> = mutableListOf()\n        for (i in str) s.add(i);\n        var a: MutableList<MutableList<Int>> = MutableList(123) {mutableListOf()}\n        for (i in 0 until s.size) {\n            if (s[i] != \'*\')\n                a[s[i].code].add(i);\n            else {\n                for (j in 97..122) {\n                    if (a[j].size > 0) {\n                        s[a[j][a[j].size - 1]] = \'.\'\n                        a[j].removeAt(a[j].size-1);\n                        break;\n                    }\n                }\n            }\n        }\n        var rs = "";\n        for (i in s)\n            if (i != \'*\' && i != \'.\')\n                rs += i;\n        return rs;\n    }\n}\n```
['Hash Table', 'Kotlin']