Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re^5: Heap sorting in perl

by Anonymous Monk
on Apr 07, 2003 at 11:33 UTC ( #248565=note: print w/replies, xml ) Need Help??


in reply to Re^5: Heap sorting in perl
in thread Heap sorting in perl

Abigail's original solution as I read it requires that the entire dataset of size N be passed into the function smallest(). This requires that you have enough memory for N things up front. Which is the original poster's problem, he doesn't. He only comfortably has room for M things, but is fetching through a much larger dataset of N.

Abigail's follow-up solution resolves this limitation admirably well...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://248565]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2020-11-29 05:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?