Remove runs of repeated characters (1D candy crush)
Repeatedly remove every run of at least k equal adjacent characters from a string until none is left, and return what remains. Removing a run can join two runs into a new one. Note that the whole run goes, not only k of it: with k = 3, abbbbc loses all four bs. A simpler version removes any group of two or more equal neighbours. Use a stack of (character, count).
No answer yet. Write the first one; the best answer gets endorsed.
