🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: net.lang.pascal
2 messages
2 total messages Started by Michael O'Hair Sat, 05 Apr 1986 17:07
Re: Sorting linked lists
#281
Author: Michael O'Hair
Date: Sat, 05 Apr 1986 17:07
15 lines
1069 bytes
[ superstitousnonsense ]

The simplest method I've found is to get the data into the linked list,
"inlist"; pour "inlist" through a binary tree sort to "outlist".

Easy to write, easy to read, easy to maintain, but keeps the stack pretty
busy.  Has any one got any figures, calculated or timed, on this method?


Disclaimer:  It's not TEK's fault, they only pay me.

			Michael O'Hair
			Tektronix, Inc.
			tektronix!tekgen!michaelo
Re: Sorting linked lists
#284
Author: Mike Levison
Date: Fri, 11 Apr 1986 16:06
11 lines
963 bytes
An algorithm for sorting items stored in linked lists will
be found in:

     Motzkin, D.  "A Stable Quicksort", Software: Practice
and Experience, Vol. 11, pp 607-611, 1981.

As the title suggests, the algorithm is basically Quicksort,
but with a different partition step, in which the list is
scanned sequentially from its beginning to its original end,
and items greater than the pivot are unlinked and attached 
to the end. 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads