Search⌘ K
AI Features

Solution: Remove All Adjacent Duplicates In String

Solution: Remove All Adjacent Duplicates In String asks you to repeatedly delete both letters in any adjacent matching pair, then return the string that remains.

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:

  • 1≤1 \leq string.length
...