Pregunta de entrevista de Google

Trees based on meduim problem