How to maintain order while removing duplicates from the string. # ...

How to maintain order while removing duplicates from the string. # ...