PolicyBazaar interview question

Asked about looping the array and modify the same array.