Appinventiv Interview Question

eliminate duplicate elements from array.