Bearophile: > I presume the complexity is O(n+a); n (the nodes) > is proportional to the number of pairs, and a > (the arcs) depends on the "intricacy" of the input pairs.
Opps... n (the number of nodes) is the number of different numbers contained in the pairs :-] Bearophile -- http://mail.python.org/mailman/listinfo/python-list