sorting strings
Charles Hannum
CMH117 at PSUVM.BITNET
Sat Nov 18 08:24:57 AEST 1989
In article <1637 at crdos1.crd.ge.COM>, davidsen at crdos1.crd.ge.COM (Wm E Davidsen
Jr) says:
>
>In article <4496 at blake.acs.washington.edu> jimmy at blake.acs.washington.edu (Jim
>Li) writes:
>
>| What sorting algorithm shoud I use? Should I use the built-in 'qsort()'?
>| How about mergesort and heapsort?
>| (I want my program to run as FAST as possible!)
>
> One technique commonly used for sorting strings is to create a vector
>of pointers to the individual strings and then sort the pointers. You
>can then write or move the data is you must.
This is commonly known as an "indexed sort," and speeds up sorting by only
moving pointers around, rather than the actual blocks of data. However,
this does not answer his question about the actual sorting algorithm. I
I will leave *that* for someone else to answer.
--
- Charles Martin Hannum II "Klein bottle for sale ... inquire within."
(and PROUD OF IT!!!) "To life immortal!"
c9h at psuecl.psu.edu "No noozzzz izzz netzzzsnoozzzzz..."
cmh117 at psuvm.psu.edu "Mem'ry, all alone in the moonlight ..."
More information about the Comp.lang.c
mailing list