Statement
This removeAdjacentPairs(s) works: it removes two equal letters next to each other over and over until no pair is left ("abbaca" → "aaca" → "ca") and returns what remains. But it searches from the start again after every removal and doesn't finish in time on long texts. Do it in one pass and explain why it was slow.