Amazon Interview Question

remove string duplicate