 All Problems
Remove All Adjacent Duplicates in String
easy
strings
stack
amazon
facebook

You are given a string s. Repeatedly remove adjacent duplicate letters until no more removals are possible. Return the final string.

Example 1:

Input: abbaca
Output: ca

Example 2:

Input: azxxzy
Output: ay

Input format: A single string.

Output format: The resulting string.

Run to check your code against the sample cases, or submit to run every case