Uber Interview Question

Graph question concerning nodes and edges