Algorithm · Meta · Medium
For a string S, continually delete pairs of identical characters that sit next to one another. Continue performing these removals until the string contains no equal adjacent characters, then return what remains. The string length will not exceed 200000. Example Input: azxxzy Output: ay The pair xx is removed first, producing azzy; removing zz then leaves ay.
Checking your access…