Sorting algorithms/Cycle sort: Difference between revisions
Content added Content deleted
(included snippet from WP) |
({{wikipedia|Cycle_sort}}) |
||
Line 1: | Line 1: | ||
{{draft task|Sorting Algorithms}}<!--Add this back when it gets promoted, also add a link to this page to the n^2 sorts in the template{{Sorting Algorithm}}--> |
{{draft task|Sorting Algorithms}}<!--Add this back when it gets promoted, also add a link to this page to the n^2 sorts in the template{{Sorting Algorithm}}--> |
||
{{wikipedia|Cycle_sort}} |
|||
From the [[wp:Cycle sort|the Wikipedia entry]] on cycle sorting: |
From the [[wp:Cycle sort|the Wikipedia entry]] on cycle sorting: |
||
:'''Cycle sort''' is an in-place, unstable sorting algorithm, a comparison sort that is theoretically optimal in terms of the total number of writes to the original array, unlike any other in-place sorting algorithm. |
:'''Cycle sort''' is an in-place, unstable sorting algorithm, a comparison sort that is theoretically optimal in terms of the total number of writes to the original array, unlike any other in-place sorting algorithm. |