Sorting algorithms/Tree sort on a linked list: Difference between revisions

m
Line 571:
I see the task used to have something to do with Finnegan's Wake, and with counting cycles, etc. Here I simply sort a list of integers.
 
It is unlikely, in ATS, that someone would use doubly-linked lists as their canonical linked list implementation. Therefore sortingSorting a singly-linked list this way would be interesting, but I cannot think of a way to do it without allocating new nodes. Of course, a quicksort or mergesort can be done on a singly-linked list without allocating new nodes.
 
(Obviously, if sorting a ''non-linear'' linked list, it is in general necessary to allocate new nodes. However, it is not necessary to allocate any ''temporary'' nodes.)
 
=={{header|C}}==
1,448

edits