TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: BILL GODFREY
from: KURT KUZBA
date: 1998-04-02 05:51:00
subject: Sorting linked list

BG>   I would recommend forgetting a quick sort, and just re-
BG>   build a copy of the linked list in sorted form. The main
BG>   nice feature about linked lists is the ability to insert
BG>   items with the minimum of fuss.
BG>   Even better, sort the list stright away as you add items
BG>   in. Insert them in the right place to start with.
BG>   (That is, if it's appropiate to do so).
   You may have a linked list of structures, however, and wish
   to sort according to various elements, such as by name, or
   by zip code, or by city, or by age. For a database, the
   ability to sort the data according to varying criteria on
   the fly is somewhat necessary. Your database could be
   something as simple as a directory list, also, which you
   might sort by date, name, time, size, or extension, in
   forward or in reverse order.
> ] Those who don't learn from the past are... Rats! I forgot...
---
---------------
* 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™.