Re: Arranging the keys problem



Hi Willem,

You're wrong.
Quicksort is not of linear runtime.
In worstcase it's O(n²) and in the average it's O(n log n).

Have a look here to get more information:
http://en.wikipedia.org/wiki/Sorting_algorithms#List_of_sorting_algorithms

Greetings,
Lars

Willem wrote:

>
> Quicksort. You may need a slight tweak to make it linear time.
>

--
The only easy day way yesterday...
.



Relevant Pages

  • Re: Arranging the keys problem
    ... Lars wrote: ... Quicksort is not of linear runtime. ... In worstcase it's Oand in the average it's O. ... In the case of only three different elements, Quicksort *is* O. ...
    (comp.programming)
  • Re: Arranging the keys problem
    ... > In worstcase it's Oand in the average it's O. ... Actually, good implementations of quicksort (e.g., those that use ... there are only a constant number of distinct elements. ... some textbook implementations are quadratic ...
    (comp.programming)