Uber interview question

Graph question concerning nodes and edges