Lexicographically Smallest String After Adjacent Removals
Find which stretches of the string can be fully erased, then pick the smallest result with a suffix dynamic program.
Find which stretches of the string can be fully erased, then pick the smallest result with a suffix dynamic program.