http://qs1969.pair.com?node_id=427861


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

Oh! A bubble sort. That's essentially what I did in my first attempt 427046, but it didn't fair very well. It would reasonable for very small N, but it very rapidly gets overtaken.

And you'll notice, it still has to process the whole list on the first pass, so lazy lists don't really come into play.


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