Question d’entretien chez Amazon

not normal data structure and algo problem