Skip to content

Latest commit

 

History

History
6 lines (3 loc) · 691 Bytes

File metadata and controls

6 lines (3 loc) · 691 Bytes

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