ITC Infotech interview question

remove duplicate characters in a string