Remove All Adjacent Duplicates
Repeatedly pick two equal letters that sit next to each other and delete both. Keep going until no such pair remains, and return the final string. The result is the same whichever order you delete in.
Example 1
s "abbaca"
returns "ca"
Delete bb to get aaca, then delete aa to get ca.
Constraints
1 <= len(s) <= 100shas lowercase letters
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.