Back to Questions

Remove Duplicate Letters

120.2K viewsAsked at Salesforce
Hard

Question Explain

Given a string `s`, remove duplicate letters so that every letter appears once and only once. The result must be the smallest in lexical order among all possible results. Use a Monotonic Stack.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question