delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/09/22/20:15:20

Message-Id: <199809230014.RAA08609@geocities.com>
From: cssl AT geocities DOT com
Sender: cssl AT mail DOT geocities DOT com
To: Kbwms AT aol DOT com, djgpp-workers AT delorie DOT com
Date: Wed, 23 Sep 1998 01:43:24 GMT0BST
MIME-Version: 1.0
Subject: Re: Much Improved Version of qsort
Reply-to: Diego Zuccato <cssl AT geocities DOT com>

 > 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019