title: graph traveling algorithm to recursively find max value
body: <p>I have a sparse directed graph. The graph is tree-ish but may have cycles, it is not very deep and the whole graph always fits in ram. Each node in the graph has an integer value.</p>
  
  <p>For a starting node, how can I find the largest reachable value: </p>
  
  <ol>
  <li>for the starting node, and</li>
  <li>for all reachable nodes (which are already visited to determine #1)</li>
  </ol>
  
  <p>(Not homework. I have a datomic entity graph and I want to recursively determine the last-modified-tx for each node reachable from a starting point.)</p>