1081. Smallest Subsequence of Distinct Characters
Return the lexicographically smallest subsequence of s that contains all the distinct characters of s exactly once.
Note: This question is the same as 316: https://leetcode.com/problems/remove-duplicate-letters/
- new solution update 2022.02.11
c++
1 | class Solution { |
c++
1 | class Solution { |