Tree sort
Sorting algorithm that builds a binary search tree and then traverses the tree
A tree sort is a sort algorithm that builds a binary search tree from the elements to be sorted, and then traverses the tree (in-order) so that the elements come out in sorted order. Its typical use is sorting elements online: after each insertion, the set of elements seen so far is available in sorted order.
Nº Q863521 ★
Common · Knowledge
Tree sort
Sorting algorithm that builds a binary search tree and then traverses the tree
A tree sort is a sort algorithm that builds a binary search tree from the elements to be sorted, and then traverses the tree (in-order) so that the elements come out in sorted order. Its typical use is sorting elements online: after each insertion, the set of elements seen so far is available in sorted order.
From Wikipedia
A tree sort is a sort algorithm that builds a binary search tree from the elements to be sorted, and then traverses the tree (in-order) so that the elements come out in sorted order. Its typical use is sorting elements online: after each insertion, the set of elements seen so far is available in sorted order. Tree sort can be used as a one-time sort, but it is equivalent to quicksort as both recursively partition the elements based on a pivot, and since quicksort is in-place and has lower overhead, tree sort has few advantages over quicksort. It has better worst case complexity when a self-balancing tree is used, but even more overhead.
Text: Wikipédia, CC BY-SA 4.0. · Image: Mathgorges (Public domain) ·
Related cards
-
Binary search tree
Data structure in tree form with 0, 1, or 2 children per node, sorted for fast lookup
Nº Q623818 ★★
Not listed
-
Binary tree
Tree data structure in which each node has at most two children
Nº Q380172 ★★★
Not listed
-
Selection sort
Sorting algorithm
Nº Q220831 ★★
Not listed
-
P
Powersort
Sorting algorithm
Nº Q136399159 ★
Not listed
-
Insertion sort
Sorting algorithm that, at each iteration, inserts the current input element into the suitable position between the already sorted elements
Nº Q117241 ★★
Not listed
-
C
Counting sort
Sorting algorithm
Nº Q1124964 ★
Not listed