Make The String Great
Two neighbouring characters clash if they are the same letter in different cases, like a and A. Repeatedly delete any clashing neighbour pair until none is left, and return the final string (it may be empty). The result does not depend on the order of deletions.
Example 1
s "leEeetcode"
returns "leetcode"
Remove eE to get leetcode.
Example 2
s "abBAcC"
returns ""
Everything cancels, leaving an empty string.
Constraints
0 <= len(s) <= 100shas English letters
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.