TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: DARIN MCBRIDE
from: MATHIEU BOUCHARD
date: 1998-03-26 21:17:00
subject: Sorting linked list

 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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.