Pregunta de entrevista de Traveloka

Question regarding operating data based on binary tree