Comcast interview question

How to print unique elements in array?