TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: TIMO FINNIL
from: KURT KUZBA
date: 1998-03-20 01:39:00
subject: Sorting linked list

TF>   Help me please, i got a big problem %-)
TF>   How do i (quick)sort linked lists?
   You don't, really.
   I would discard the old list while performing a median
   insert sort in a new one. It will still be slow because you
   have to walk the list all the time, unless you also maintian
   a list of pointers. You COULD just walk the list and create
   an array of list member pointers, and then sort that array
   and relink the list from the sorted array. That would most
   likely be the fastest method available, now that I think of
   it, and would require the least code, also.
> ] We learn from our mistakes. I'm in the Accelerated Program!!
---
---------------
* Origin: *YOPS ]I[* 8.4 GIG * RA/FD/FE * Milwaukee, WI (1:154/750)

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