Barclays interview question

Delete duplicates characters in string