Question d’entretien chez Uber

Medium leetcode difficulty. Something to do with bst