Microsoft interview question

Removing Duplicates in a given array