Returns the nodes that a path from one of the roots reaches, with the roots themselves.
The nodes of the graph are the integers from 0 up to size. The result lists the nodes in
the order in which a breadth-first search finds them.
The search takes time linear in the number of nodes and edges that it reaches.
Returns the nodes that a path from one of the roots reaches, with the roots themselves. The nodes of the graph are the integers from 0 up to
size. The result lists the nodes in the order in which a breadth-first search finds them.The search takes time linear in the number of nodes and edges that it reaches.