title: Tree root finding
body: <p>How could I get from set of nodes and edges get tree with a root?
  (I'm working with connectivity-matrix, each edge has weight: graph[i][j], without any negative edges). Later I need to do DFS and find LCA's in that tree, so it would be good for optimize.</p>