Uber interview question

A question about graph.