I am solving this question from leetcdoe…
1081. Smallest Subsequence of Distinct Characters
Here we have to print smallest subsequnece which should have all distict character of a given string.
I am not able to come up with any nice approach, here i can find many solution on discussion, but not able to understand them clearly.
Can you help me to come up with nice logic, instead of memorising solution this would be better.
Thanks