mergesort. Reply
Serge D. Mechveliani
mechvel@botik.ru
Fri, 28 Jun 2002 12:32:30 +0400
On Fri, Jun 28, 2002 at 09:44:11AM +0200, Ketil Z. Malde wrote:
> "Serge D. Mechveliani" <mechvel@botik.ru> writes:
>
> > But sortBy' (compare) [1 .. n]
>
> > costs too much, even for n = 11000.
> > It costs (on worst data) many times more than mergeSort.
>
> Yes, but why do you want to sort sorted data?
>
> [..]
quickSort will loose much for many data which are `almost' sorted.
To detect fast which data are bad for qucikSort, you will, probably,
need mergeSort ...
-----------------
Serge Mechveliani
mechvel@botik.ru