Quorum Interview Question

How to remove duplicates from an array How can we optimize it?