Strand sort: Difference between revisions

Content deleted Content added
Heldw (talk | contribs)
Added a step by step example on how the algorithm works
Heldw (talk | contribs)
Line 47:
1 < 6 so 1 is not added to the sub-list. 4 < 6 so 4 is not added to the sub-list.
 
Step 13: Since there are no more elements in the original list to compare {6} to, the sub-list is merged with the solution list.

The solution list now contains: {6, 7, 13, 19, 25, 19}.
 
Step 14:  Move the first element of the original list into sub-list. Sub-list contains {1}
Line 55 ⟶ 57:
4 > 1 so 4 is added to the sub-list.
 
Step 1516:  Since there are no more elements in the original list to compare {4} to, the sub-list is merged with the solution list.

The solution list now contains: {1,4, 6, 7, 13, 19, 25, 19}. There are now more elements in the original list, and all of the elements in the solution list have successfully been sorted into increasing numerical order.
 
{{AFC submission|t||ts=20181106150605|u=Heldw|ns=118|demo=}}<!-- Important, do not remove this line before article has been created. -->