Module dsalgo::center_nodes_of_tree
source · Expand description
find a pair of center nodes of the given unweited tree graph. if tree diameter is even or number of nodes in the path is odd, two center nodes are same.
find a pair of center nodes of the given unweited tree graph. if tree diameter is even or number of nodes in the path is odd, two center nodes are same.