Nokia interview question

Remove the duplicate from the array