Back to QuestionsPractice with This Question
Remove Duplicate Letters
120.2K views•Asked 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.