StackBox interview question

remove duplicates from an array