Mail Archives: djgpp-workers/1998/09/22/20:15:20
> Sort Function is Fat-Pivot Quicksort (Median Pivots)
Doesen't it "simply" use a different pivot ? If it's chosen only by its
position in the array, then it's possible to generate a test set that
highlights quadratic behaviour. The only way is to choose the pivot as an
element that makes two halves of the original array... Well, then I'd
think about using a merge sort with in-place merge. Its complexity is
ALWAYS nlog(n). Does the standard tell qsort() MUST use quick-sort ?
BYtE,
Diego.
- Raw text -