Available question text
Given a string of lowercase letters and '*' where each operation deletes the leftmost '*' and the lexicographically smallest non-'*' character to its left, compute the lexicographically smallest resulting string after all '*' are removed. The core challenge is greedily selecting and removing the minimal preceding characters while preserving order, which calls for an ordered multiset/priority structure or an amortized stack-based approach to achieve optimal performance for n up to 1e5.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3170. Lexicographically Minimum String After Removing Stars
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source