#3174
Clear Digits
newbie · 145 · lc easy +13 · 82.7% accepted · 694 likes · top 94%
Description
Given a string s, repeatedly remove the leftmost digit together with the nearest non-digit character to its left, until no digits remain. Return the resulting string. (A digit with no non-digit to its left cannot be processed.)
Code
1
2
3