Search⌘ K
AI Features

Solution: Remove All Adjacent Duplicates In String

Solution: Remove All Adjacent Duplicates In String asks you to repeatedly remove each pair of neighboring identical letters and return the string that remains when no adjacent duplicate pair is left.

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
...