Given a combination of polymers, represented by a string of uppercase and lowercase characters, remove the reactions that can take place until no reactions remain. What's the length of the string that has no more reactions?
A reaction can take place if two subsequent letters are the same letter with opposite cases.
- "aA" reacts.
- "Aa" reacts.
- "AA" does not react.
- "aa" does not react.