Mercer Interview Question

remove consecutive duplicate character from a string.