Mail Archives: djgpp/1998/03/05/21:06:25
The lower bound on general sorting is O(nlog(n)).
The merge sort algorithm accomplishes this in the worst case,
quick sort in the average case. Quick sort is O(n^2) in the
worst case. Radix and Bucket sort are indeed O(n), but like
Paul says, they make assumptions about the data set.
Patrick
Paul Szuch wrote:
> Don't forget Radix or Bucket sorts both are the fastest I know of at
> O(N) but have some special requirements. Radix will only compare
> integers and bucket requires temporary storage.
>
> On Sun, 22 Feb 1998 22:14:18 -0800, "STEVEN S. FALLS"
> <broadview AT earthlink DOT net> wrote:
>
> > What is the best sorting algorythm and what is it. I mean, how would
> >one program the algrothym?
> > Thanks,
> > -Ardy
> >
- Raw text -