Python Solution w/ Counter and Stack
\nclass Solution:\n    def smallestSubsequence(self, text: str) -> str:\n        count = Counter(text); visited = {}; st = []  # stack\n        \n        for cu
```\nclass Solution:\n    def smallestSubsequence(self, text: str) -> str:\n        count = Counter(text); visited = {}; st = []  # stack\n        \n        for curr in text:\n            count[curr] -= 1\n            if curr in visited and visited[curr]: continue\n                \n            while st:\n                prev = st[-1]\n                if curr >= prev or count[prev] <= 0: break\n                st.pop(); visited[prev] = False\n                \n            st.append(curr); visited[curr] = True\n            \n        return "".join(st)\n```\t\t
[]