Re: Arranging the keys problem
- From: "Googmeister" <googmeister@xxxxxxxxx>
- Date: 30 Sep 2005 04:13:13 -0700
Lars Weber wrote:
> 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
Actually, good implementations of quicksort (e.g., those that use
3-way partitioning / Dutch National Flag) are O(n) worst-case if
there are only a constant number of distinct elements.
Unfortunately, some textbook implementations are quadratic
when there are a constant number of distinct elements.
.
- References:
- Re: Arranging the keys problem
- From: Willem
- Re: Arranging the keys problem
- From: Lars Weber
- Re: Arranging the keys problem
- Prev by Date: Re: Arranging the keys problem
- Next by Date: problem due to localization of decimal representation of number
- Previous by thread: Re: Arranging the keys problem
- Next by thread: Re: Arranging the keys problem
- Index(es):
Relevant Pages
|