Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3174. Clear Digits
Given a string of lowercase letters and digits, repeatedly remove each digit together with the nearest non-digit to its left until no digits remain, and return the final string. This can be solved by simulating a stack/greedy left-pairing: when you see a digit, pop the most recent letter to its left.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.