Badr IT interview question

remove duplicates from array