Sorting algorithms/Tree sort on a linked list: Difference between revisions
Content added Content deleted
No edit summary |
(Fix completely broken Wikipedia links) |
||
Line 1: | Line 1: | ||
{{draft task|Sorting Algorithms}} |
{{draft task|Sorting Algorithms}} |
||
{{Sorting Algorithm}} |
{{Sorting Algorithm}} |
||
{{Wikipedia pre 15 June 2009|pagename= |
{{Wikipedia pre 15 June 2009|pagename=Tree_sort|lang=en|oldid=295989333|timedate=15:13, 12 June 2009}} |
||
A '''tree sort''' is a [[wp:sort algorithm|sort algorithm]] that builds a [[wp:binary search tree|binary search tree]] from the keys to be sorted, and then traverses the tree ([[wp:Tree traversal|in-order]]) so that the keys come out in sorted order. Its typical use is when sorting the elements of a stream from a file. Several other sorts would have to load the elements to a temporary data structure, whereas in a tree sort the act of loading the input into a data structure is sorting it. |
A '''tree sort''' is a [[wp:sort algorithm|sort algorithm]] that builds a [[wp:binary search tree|binary search tree]] from the keys to be sorted, and then traverses the tree ([[wp:Tree traversal|in-order]]) so that the keys come out in sorted order. Its typical use is when sorting the elements of a stream from a file. Several other sorts would have to load the elements to a temporary data structure, whereas in a tree sort the act of loading the input into a data structure is sorting it. |
||