IPHS Technologies interview question

remove duplicates element from the array