Algorithm::MinMax - Finding the minimum and maximum of an array with at most
3n/2 - 2 comparisons.
@a = ( 3, 2, 5, 4, 8, 9 );
@r = Algorithm::MinMax->minmax( \@a );
# $r = minimum = 2
# $r = maximum = 9
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.
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.
Daniel Etzold, email@example.com