Bug#343100: found 343100 0.71-3
found 343100 0.71-3
thanks
Anthony DeRobertis <aderobertis@metrics.net> writes:
> use Heap;
>
> my $heap = Heap->new;
> my $elem;
>
> use Heap::Elem::Num(NumElem);
>
> foreach $i ( 1..100 ) {
> $elem = NumElem( $i );
> $heap->add( $elem );
> }
>
> while( defined( $elem = $heap->extract_maximum ) ) {
> print "Smallest is ", $elem->val, "\n";
> }
To clarify, this is the example code from Heap(3) in version 0.70; with
version 0.71, extract_maximum() should be replaced with extract_top().
Thanks,
Matej
Reply to: