...

/

Solution: Remove All Adjacent Duplicates In String

Solution: Remove All Adjacent Duplicates In String

Let's solve the Remove All Adjacent Duplicates In String problem using the Stacks pattern.

Statement

You are given a string consisting of lowercase English letters. Repeatedly remove adjacent duplicate letters, one pair at a time. Both members of a pair of adjacent duplicate letters need to be removed.

Constraints:

  • 11 \leq string.length 103
...
Access this course and 1400+ top-rated courses and projects.