Date: Thu, 5 Jun 1997 14:48:55 +0800 (GMT) From: Orlando Andico To: Conrad Wei-Li Song cc: Timothy Robb , djgpp AT delorie DOT com Subject: Re: LinkedLists In-Reply-To: <199706050619.CAA13562@delorie.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk > >I've given up on Quick Sorting my list because I will be adding one item > >at a time to it and the add function will call the sort function, as a > >result Insertion Sort would probably be the best method. > > > Listen. If you're not going to be calling a lot of inserts or deletes in > the middle of the list consider implementing the list as a self-adjusting > array-- that is, when you run out of room in your array, you double its [..] Forgive me if I'm wrong, but I think the best implementation overall is a dynamically-allocated binary tree. Did anyone mention that? you can even get a complete, functional system (source code), easily adaptable to your own needs, in the C Bible (a.k.a. Kernighan and Ritchie). That's what I did for some UNIX accounting stuff that had previously been done with awk (the data files were about 30MB in size) and the processing time was reduced from 2+ days to 45 minutes. All standard ANSI C. ----------------------------------------------------------------------- Orlando Alcantara Andico WWW: http://www2.mozcom.com/~orly/ Email: orly AT mozcom DOT com ICBM: 14 deg. 30' N, 120 deg. 59' E POTS: (+632) 932-2385