Jump to content

Strand sort

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Heldw (talk | contribs) at 15:07, 6 November 2018 (Created a stub for Strand sort. Currently doing more research to add to it.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Strand sort is a very simple recursive sorting algorithm that sorts items of a list into increasing order. It works by moving the first element of a list into a sub-list. Then comparing each subsequent element in the sub-list to the original list and moving each element in the original list that is greater than the element in the sub-list to the sub-list. Then the sub-list is merged into a new list. Repeat this process and merge all sub-lists until all elements are sorted.[1] This algorithm is called strand sort because there are strands of sorted elements within the unsorted elements that are removed one at a time.[2] This algorithm is also comparison sorting algorithm because elements of the sub-list are compared to elements of the original list.  This algorithm is also used in J Sort for fewer than 40 elements.[3] Strand sort has a worst case time complexity of O(n2) which occurs when the input list is reverse sorted.[1] Where n represents the total number of elements being sorted. Strand sort has a best case time complexity of O(n) which occurs when the input is a list that is already sorted.[2] Its average case complexity is O(n log n).[1] Compared to other sorting algorithms, strand sort is on the slower side.[1]Strand sort is stable due to the fact that the relative order of the elements of the same value does not change. Strand sort is not in-place because it’s space complexity is O(n).[1]




References

  1. ^ a b c d e IT enabled practices and emerging management paradigms. Gupta, I. C. (Ishwar Chandra), 1946-, Jaroliya, Deepak., Prestige Institute of Management and Research. (1st ed ed.). Indore: Prestige Institute of Management and Research. 2008. ISBN 9788174466761. OCLC 641462443. {{cite book}}: |edition= has extra text (help)CS1 maint: others (link)
  2. ^ a b "strand sort". xlinux.nist.gov. Retrieved 2018-11-06.
  3. ^ Sudipta., Mukherjee, (2008). Data structures using C : 1000 problems and solutions. New Delhi: Tata McGraw-Hill. ISBN 9780070667655. OCLC 311311576.{{cite book}}: CS1 maint: extra punctuation (link) CS1 maint: multiple names: authors list (link)