Count Number of Possible Root Nodes
Changing the root only flips the one edge between the old and new root, so every root can be scored from its neighbour in one rerooting pass.
Changing the root only flips the one edge between the old and new root, so every root can be scored from its neighbour in one rerooting pass.