wild-inter.net

Decision trees of sorting algorithms

Run a sorting algorithm on all n! orderings of its input and merge the runs as long as they get the same answers from less: the result is its comparison (decision) tree. Nodes name the compared elements by their original position in the input, since the tree does not show how the algorithm moves elements around.

Algorithm
n
Labels
Run one input through the tree
Selected nodeclick a node to show its details here
Code