Re: Arranging the keys problem



Lars wrote:
) 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).

In the case of only three different elements, Quicksort *is* O(n).
You don't even need any tweaking.


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
.



Relevant Pages

  • Re: Arranging the keys problem
    ... Quicksort is not of linear runtime. ... In worstcase it's Oand in the average it's O. ... Prev by Date: ...
    (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)