Pergunta de entrevista da empresa Google

a question involving Tree and Hashtable manipulation