Microsoft Interview Question

to remove duplicates from array