Pergunta de entrevista da empresa Mercer

remove consecutive duplicate character from a string.