Aleksandar Donev wrote:
> Hello,
> Does someone have a (public) code (preferably Fortran, but C is also OK
> given C Interoperability) that can sort a large (1 billion elements)
> array (say, reals) in place? The array is not huge, i.e., it fits in
> memory, but still large. Quicksort, which I usually use, is recursive
> and its memory usage quickly went out of control. Speed is not of utmost
> importance though obviously O(N^2) won't do.
> Thanks,
> Aleks
>
Hi Aleks,
I did not want to do this in public, but here is a code I use in my Fortran
course. You can run it to get a feel of just how good heapsort is.
We miss you!
John.
|