BankBazaar interview question

Remove non unique element from array