Mail Archives: djgpp/1998/02/23/06:15:30
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
- Raw text -