Help for this page

Select Code to Download


  1. or download this
    Discipulus => sub{
            my @list = sort {$a<=>$b} @input;
    ...
            Compare(\@list,\@output) or die "@list" if DO_CHECK;
        },
    
  2. or download this
    Discipulus4 => q{ # https://www.perlmonks.org/?node_id=1229437
            @list = sort {$a<=>$b} @list;
            if ($list[0] < 0 and $list[-1] >= 0)
                { push @list, shift @list until $list[0] >= 0 }        },