Ready to sort
Statistics
Status Idle
Operations 0 / 0
Controls
50
5x
Summary
Strand Sort works by repeatedly extracting sorted sub-lists (strands) from the unsorted input and merging them into a final sorted result. It is most efficient when the data is already partially sorted, as it can identify long existing runs of order.
How it Works
-
Create an empty
outputlist. -
While the input list is not empty, create a temporary
strandlist. -
Move the first item of the input to the
strand. -
Traverse the remaining input list. If an item is greater than the last item of the
strand, move it from input tostrand. -
Merge the now sorted
strandinto theoutputlist. -
Repeat until the input list is empty.