City of Vaughan interview question

Remove the duplicates from the given string.