Question d’entretien chez Microsoft

Binary Tree problem. Medium difficulty