Simple Python Solution || beats 98%
\nclass Solution:\n    def smallestSubsequence(self, s: str) -> str:\n        stack, seen = [], set()\n        last = {c:idx for idx,c in enumerate(s)}\n       
```\nclass Solution:\n    def smallestSubsequence(self, s: str) -> str:\n        stack, seen = [], set()\n        last = {c:idx for idx,c in enumerate(s)}\n        for idx, char in enumerate(s):\n            if char in seen:\n                continue\n            while stack and stack[-1] > char and idx < last[stack[-1]]:\n                c = stack.pop()\n                seen.remove(c)\n            stack.append(char)\n            seen.add(char)\n        return "".join(stack)\n\n```
['Python']