Description
Given a string s of lower and upper case English letters, make the string good by removing two adjacent characters that are the same letter but different cases. Return the resulting string.
Examples
Input:
s = "leEeetcode"Output:
"leetcode"Explanation:
Remove eE first, then process recursively.
Input:
s = "a"Output:
"a"Explanation:
A single character has no adjacent pair to remove, so the string is already great.
Input:
s = "abBAcC"Output:
""Explanation:
Remove bB to get "aAcC", then remove aA to get "cC", finally remove cC to get an empty string.
Constraints
- •
1 ≤ s.length ≤ 100