Pregunta de entrevista de Google

a question involving Tree and Hashtable manipulation