Skip to content

Latest commit

 

History

History

strandsort

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Strand Sort

A sort algorithm that works well if many items are in order. First, begin a sublist by moving the first item from the original list to the sublist. For each subsequent item in the original list, if it is greater than the last item of the sublist, remove it from the original list and append it to the sublist. Merge the sublist into a final, sorted list. Repeatedly extract and merge sublists until all items are sorted. Handle two or fewer items as special cases. This is a way of sorting numbers by extracting shorter sequences of already sorted numbers from an unsorted list.

Source: GeeksforGeeks