Microsoft Interview Question

How to eliminate duplicates in a string.