Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^5: Better mousetrap (getting top N values from list X)

by sleepingsquirrel (Chaplain)
on Feb 03, 2005 at 23:20 UTC ( [id://427862]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Better mousetrap (getting top N values from list X)
in thread Better mousetrap (getting top N values from list X)

You can do lazy heap/merge/quick sorts.


-- All code is 100% tested and functional unless otherwise noted.
  • Comment on Re^5: Better mousetrap (getting top N values from list X)

Replies are listed 'Best First'.
Re^6: Better mousetrap (getting top N values from list X)
by BrowserUk (Patriarch) on Feb 03, 2005 at 23:22 UTC

    True, but you still need the whole list for the first pass.


    Examine what is said, not who speaks.
    Silence betokens consent.
    Love the truth but pardon error.
      So?


      -- All code is 100% tested and functional unless otherwise noted.

        So,...you said:

        ...if you had lazy lists (coming in perl6)...

        And I couldn't see how lazy lists would benefit this problem; hence my original question (way back up there^^^ somewhere).


        Examine what is said, not who speaks.
        Silence betokens consent.
        Love the truth but pardon error.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (None)
    As of 2024-04-25 01:07 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found