title: calculate distance between 2 nodes in a graph
body: <p>I have directed graph stored in the following format in the database {STARTNODE, ENDNODE}. Therefore, {5,3} means there is an arrow from node 5 to node 3.</p>
  
  <p>Now I need to calculate the distance between two random nodes. What is the most efficient way? By the way, the graph is has loops.</p>
  
  <p>Thanks a lot!</p>