Question d’entretien chez Amazon

Coding related question generally based on tree