Question d’entretien chez LiveRamp

An algorithm question related to one-dimensional array. Not that hard. Average effort to solve it.