in reply to Re^4: Tree in perl
in thread Tree in perl

To elaborate further ... One might dispute (or rather get confused) if the graph is directed or not¹, but in either case it's certainly not a tree.

1 /| 2 | \| 3

edit

Furthermore asking for the "shortest" path in a tree doesn't make much sense, there is by definition exactly one between any two nodes.

Cheers Rolf

(addicted to the Perl Programming Language and ☆☆☆☆ :)

¹) the definition above circumvents the problem by postulating an undirected graph.