Deloitte Interview Question

remove repeating character from a string