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)
|