Watch 10 video solutions for Clear Digits, a easy level problem involving String, Stack, Simulation. This walkthrough by NeetCodeIO has 6,944 views views. Want to try solving it yourself? Practice on FleetCode or read the detailed text solution.
You are given a string s.
Your task is to remove all digits by doing this operation repeatedly:
Return the resulting string after removing all digits.
Example 1:
Input: s = "abc"
Output: "abc"
Explanation:
There is no digit in the string.
Example 2:
Input: s = "cb34"
Output: ""
Explanation:
First, we apply the operation on s[2], and s becomes "c4".
Then we apply the operation on s[1], and s becomes "".
Constraints:
1 <= s.length <= 100s consists only of lowercase English letters and digits.