Python:  Easy!  Simple Solution using  Stack  ||  Time O(n)
\nclass Solution:\n    def smallestSubsequence(self, text: str) -> str:\n        countMap = collections.defaultdict(int)\n        stack = []\n        selected =
```\nclass Solution:\n    def smallestSubsequence(self, text: str) -> str:\n        countMap = collections.defaultdict(int)\n        stack = []\n        selected = set()\n\n        for c in text:\n            countMap[c] += 1\n\n        for c in text:\n            countMap[c] -= 1\n            if c not in selected:\n                while stack and countMap[stack[-1]] > 0 and stack[-1] > c:\n                    selected.remove(stack.pop())\n                    \n                stack.append(c)\n                selected.add(c)\n                \n        return "".join(stack)\n```
['Python', 'Python3']