Deloitte interview question

remove repeating character from a string