Microsoft interview question

phone screen: remove duplicates from string