From: an096 AT yfn DOT ysu DOT edu (David A. Scott) Newsgroups: comp.os.msdos.djgpp Subject: Re: Sorting Algorythums Date: 23 Feb 1998 11:09:06 GMT Organization: St. Elizabeth Hospital, Youngstown, OH Lines: 24 Message-ID: <6crlci$ffp$1@news.ysu.edu> References: <34F12890 DOT 57F35CC9 AT LSTM DOT Ruhr-UNI-Bochum DOT De> <34F113BA DOT 203AD4E9 AT earthlink DOT net> Reply-To: an096 AT yfn DOT ysu DOT edu (David A. Scott) NNTP-Posting-Host: yfn2.ysu.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In a previous article, demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De (Thomas Demmer) says: >STEVEN S. FALLS wrote: >> >> What is the best sorting algorythm and what is it. I mean, how would >> one program the algrothym? > >There is no thing as _the_best_ sorting algorithm. It depends >on the number of items you want to sort, how the data is >pre-sorted, if there are memory constraints etc. > >One of the best, on average, is quicksort, which takes >O(n log(n)) operations (from the back of my head, no >gurantees). It can be a bit quirky when the collection is nearly >************************************************************* > Try heapsort. It is guranteed O(n log(n)). -- http://cryptography.org under /Misc location of scott16u.zip