← ALL NOTES
String

1081. Smallest Subsequence of Distinct Characters

Return the lexicographically smallest subsequence of s that contains every distinct character exactly once. This is the "remove duplicate letters" problem (#316 is identical), and it's a classic…

Loading…