in reply to Re: Heap sorting in perl
in thread Heap sorting in perl
When you are done you can then just extract off all of the elements in the heap, and you have the smallest N of them from largest to smallest. Without excessive memory usage.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Heap sorting in perl
by adrianh (Chancellor) on Apr 05, 2003 at 15:40 UTC | |
by Anonymous Monk on Apr 05, 2003 at 15:51 UTC | |
by adrianh (Chancellor) on Apr 05, 2003 at 16:29 UTC | |
by Anonymous Monk on Apr 05, 2003 at 17:02 UTC | |
by adrianh (Chancellor) on Apr 05, 2003 at 20:12 UTC |