Practice Lexicographically Minimum String After Removing Stars
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Lexicographically Minimum String After Removing Stars
Problem Statement
While s contains an asterisk, remove its leftmost asterisk and the alphabetically smallest non-asterisk character to its left. If several preceding characters share that smallest value, choose which occurrence to remove. Return the lexicographically smallest string achievable after all asterisks have been removed.
Source: Lexicographically Minimum String After Removing Stars on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
s = "aaba*"
"aab"
# Example 2
s = "abc"
"abc"
Constraints
Related LeetCode Problems
Practice more problems similar to Lexicographically Minimum String After Removing Stars.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.