my $max = topsort 1, @list; my $min = topsort -1, @list;