Question d’entretien chez Amazon

Two algorithm problems average medium difficulty