Help for this page

Select Code to Download


  1. or download this
    
    my @values = qw(1 4 3 2 5 6 3 4 2);
    ...
    }
    # @maxima now contains qw(4 6 4);
    print join(', ', (sort { $a <=> $b } @maxima)[0 .. $k - 1])."\n";