Pregunta de entrevista de Google

Problems dealing with tree data structure