Compass interview question

question on the tree, graph, and system design.