Re: fast stable sort
- From: cri@xxxxxxxx (Richard Harter)
- Date: Sat, 15 Nov 2008 00:26:55 GMT
On Fri, 14 Nov 2008 19:03:43 -0500, CBFalconer
<cbfalconer@xxxxxxxxx> wrote:
Richard Harter wrote:
CBFalconer <cbfalconer@xxxxxxxxx> wrote:
pete wrote:
Richard Harter wrote:
There are in place stable versions of mergesort.
Can you post C code for a stable in place mergesort function?
Such exists in wdfreq.c, an example program on the use of hashlib.
wdfreq has been put in public domain, hashlib is released under
GPC. See:
<http://cbfalconer.home.att.net/download/hashlib.zip>
The context is in-place with O(1) extra storage; use of an
auxilliary linked list is not on the table.
How do you load a herd of (variable length) strings into your
system without at least an auxiliary table of pointers to the
individual strings? Once you recognize this, the obvious way to
load the strings is with a singly linked list. The total memory
usage will normally be less. Note that the sort only diddles the
pointers, not the strings.
In this case the requirement is to sort the pointers in place
without using an auxilliary linked list. IOW, load the pointers
in an array. That is the requirement; you can't use a linked
list.
Richard Harter, cri@xxxxxxxx
http://home.tiac.net/~cri, http://www.varinoma.com
Save the Earth now!!
It's the only planet with chocolate.
.
- Follow-Ups:
- Re: fast stable sort
- From: CBFalconer
- Re: fast stable sort
- References:
- fast stable sort
- From: subramanian100in@xxxxxxxxx, India
- Re: fast stable sort
- From: pete
- Re: fast stable sort
- From: Richard Harter
- Re: fast stable sort
- From: pete
- Re: fast stable sort
- From: CBFalconer
- Re: fast stable sort
- From: Richard Harter
- Re: fast stable sort
- From: CBFalconer
- fast stable sort
- Prev by Date: Re: fast stable sort
- Next by Date: Re: Design of a loop counting function
- Previous by thread: Re: fast stable sort
- Next by thread: Re: fast stable sort
- Index(es):
Relevant Pages
|