Question d’entretien chez Amazon

Leet code question like based