Infosys interview question

Removing duplicate from an array