Algorithm-MinMax

 view release on metacpan or  search on metacpan

MinMax.pm  view on Meta::CPAN

  # $r[1] = maximum = 9

=head1 DESCRIPTION

The implementation finds the minimum and maximum of a given array with
at most 3n/2 - 2 comparisons, where n is the number of elements of the
array. 

=head1 RETURN

Returns an array where the first entry is the minimum and the second
entry the maximum of the given array.

If minmax is called with an empty array, minmax will also return an 
empty array.

=head1 AUTHOR

Daniel Etzold, detzold@gmx.de

=cut



( run in 1.095 second using v1.01-cache-2.11-cpan-39bf76dae61 )