Pregunta de entrevista de Meta

Building a tree, operating with map