LinkedIn Interview Question

Graph question asking minimum distance between two nodes.