Question d’entretien chez Amazon

Leetcode easy, it was array related