Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!crdgw1!crdos1!davidsen From: davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) Newsgroups: comp.lang.c Subject: Re: sorting strings Keywords: sort, string Message-ID: <1637@crdos1.crd.ge.COM> Date: 17 Nov 89 18:43:09 GMT References: <4496@blake.acs.washington.edu> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Distribution: usa Organization: GE Corp R&D Center, Schenectady NY Lines: 14 In article <4496@blake.acs.washington.edu> jimmy@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. -- bill davidsen (davidsen@crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen) "The world is filled with fools. They blindly follow their so-called 'reason' in the face of the church and common sense. Any fool can see that the world is flat!" - anon