TF>> Help me please, i got a big problem %-)
TF>> How do i (quick)sort linked lists?
DM> Quick sort requires random access which lists don't have. One method
may
DM> be insertion sort if you can move from one list to another.
I don't know what your quicksort is, but mine doesn't require random
access. I would still use an array version instead of a list version
cause i'm lazy, however, i can write a linked list version that won't
be *that* slow (i mean, it won't be anymore than O(n log n)).
Write your quicksort algorithm and i'll see why it can't be applied to
lists...
matju
--- Terminate 4.00/Pro
---------------
* Origin: The Lost Remains Of SatelliteSoft BBS (1:163/215.42)
|