Question d’entretien chez Yandex

Find leaf sum in bin tree