NAME

Algorithm::MedianSelect - Median finding algorithm

SYNOPSIS

use Algorithm::MedianSelect qw(median);

@num_items = qw(1 2 3 5 6 7 9 12 14 19 21);

print median( @num_items );

DESCRIPTION

This module finds the item which is smaller than half of the items and bigger than half of the items. Numbers and character strings are processed; character strings are evaluated by their length. Mixed types are unsupported.

FUNCTIONS

median

Returns the median item.

$median = median( @items );

EXPORT

median() is exportable.

SEE ALSO

http://www.cs.sunysb.edu/~algorith/files/median.shtml