Google | Phone screen | 1d candy crush
Anonymous User
5702

Given an string, if it has 3 or more consecutive same character, they can cancel each other, then concantanate the left and right , and keep cancel if new concantanated string has 3 or more consecutive items.

example:
in : acaaaacc
[acaaaacc] -> [accc] -> [a] 
out : a
Comments (16)