Remove duplicate letters from a string so each appears once, returning the largest lexicographical result.
Unlock detailed company stats for this questionUpgrade
Given a string of length n, remove duplicate letters so that each letter appears exactly once and the result is the largest possible in lexicographical order. Example: abccab returns cab. Constraint: 1 <= n <= 10^5.
Community answers
No answers contributed by the community yet.


