NVIDIA interview question

remove duplicates from array in place