Demandbase interview question

how to remove redundancy from an array inplace