MathCo interview question

extract unique elements from the given array