Addepar Interview Question

One is remove duplicate in a string, a medium lc question