Find a path between two nodes in a graph.