You are given a string s containing lowercase English letters and digits. Repeatedly perform the following operation until no digits remain in s:
Choose any digit character in s, delete that digit, and also delete the closest lowercase letter to its left.
Return the final string after all possible operations have been applied.
Note: The input is constructed so that every digit can be removed by repeatedly deleting a digit together with a letter to its left.
Constraints:
s.length
s consists only of lowercase English letters and digits
The input is generated such that it is possible to delete all digits
You are given a string s containing lowercase English letters and digits. Repeatedly perform the following operation until no digits remain in s:
Choose any digit character in s, delete that digit, and also delete the closest lowercase letter to its left.
Return the final string after all possible operations have been applied.
Note: The input is constructed so that every digit can be removed by repeatedly deleting a digit together with a letter to its left.
Constraints:
s.length
s consists only of lowercase English letters and digits
The input is generated such that it is possible to delete all digits