Cascading Pair Removal
Asked at Grammarly · Coding Questions · Difficulty: Easy · Last asked Jul 15, 2026
Process a string from left to right, deleting every pair of equal characters that sit next to each other. Deleting a pair can make two other equal characters adjacent, and those must be deleted too. Return what remains once no adjacent equal pair is left.
Loading the problem…