Question d’entretien chez Microsoft

Typical array manipulation from leetcode