FG> I think we are talking about "Quicksort" and "Clever Quicksort"
FG> The difference is the method how to find the pivot element.
FG> Quicksort is "normaly" taking the last Element of the Array.
FG> while Clever Quicksort takes the first, the last and an element in
FG> the middle of the array and of these the middle one (sorry for my bad
FG> english hope you get that).
FG> Another improvement of "quicksort" is, to implement "insertion sort" for
FG> small splits of the array and to make the algorythm iterative by using
FG> Stacks.
FG> In this case you can save about 30% of time to sort an array
Okay, that's mostly what I knew... Another improvement (my favorite) is
not exchanging elements, but rather, hold the pivot in an alternate
location, and use this free spot to pass things around in 2n+2 copies
instead of 3n (for n exchanges)
any other tricks like that?
matju
--- Terminate 4.00/Pro
---------------
* Origin: The Lost Remains Of SatelliteSoft BBS (1:163/215.42)
|