code: function toArray (span, root) {
    if(!span[root]) return null
    var a = [root]
    while(span[root])
      a.push(root = span[root])
    return a.reverse()
  }
docs: find the shortest path between two nodes. if there was no path within max hops, return null. convert a spanning tree to an array.