Help for this page
# -- input -- ... time complexity: O(n) (without the unneccesary sort)
%lookup = map { join(',', $_->[0], $_->[1]) => join(',', $_->[2], $_-> +[3]) } @r; ... die("broken or repeat!\n") unless defined($next); } while ($next ne $start);