python STACK  O(N) time complexity  O(K) space complexity easy to read
\ndef smallestSubsequence(self, chars: str) -> str:\n        current_string_chars = set()\n        stack = []\n        hm = Counter(chars)\n\n        for char i
```\ndef smallestSubsequence(self, chars: str) -> str:\n        current_string_chars = set()\n        stack = []\n        hm = Counter(chars)\n\n        for char in chars:\n            while stack and char < stack[-1] and char not in current_string_chars and hm[stack[-1]] > 0:\n                current_string_chars.remove(stack[-1])\n                stack.pop()\n            if char not in current_string_chars:\n                stack.append(char)\n                current_string_chars.add(char)\n            hm[char] -= 1\n\n        return "".join(stack)\n\n```
[]