Question d’entretien chez Palantir Technologies

Algorithm question using tree data structure