Skip to content

Files

Latest commit

50c4b2e · Oct 26, 2018

History

History
This branch is up to date with matthewsamuel95/ACM-ICPC-Algorithms:master.

strandsort

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 26, 2018
Oct 26, 2018

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