You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Second Approach - Stack approach iterating over s string and pushing back characters whenever it doesn't meet the 'AB' and 'CD' substring comparing with last added char, otherwise pop the stack, returning at the end the stack length. (https://leetcode.com/problems/minimum-string-length-after-removing-substrings/solutions/5879675/easy-stack-solution-python-java-c-o-n-o-n/?envType=daily-question&envId=2024-10-07)