Question d’entretien chez Amazon

Mostly coding question of medium difficulty