Sorting algorithms/Cycle sort: Difference between revisions

Content added Content deleted
m (→‎{{header|Perl 6}}: removed 'is rw' from sub, here and in previous)
m (added whitespace before the TOC, added other whitespace in the task's preamble.)
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}}
{{wikipedia|Cycle_sort}}

<br>
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.
Line 13: Line 15:
;See also:
;See also:
* [http://www.youtube.com/watch?v=ZSJGf5Ngw18 Youtube] Visualization and audibilization of Cycle Sort algorithm.
* [http://www.youtube.com/watch?v=ZSJGf5Ngw18 Youtube] Visualization and audibilization of Cycle Sort algorithm.
<br><br>


=={{header|C}}==
=={{header|C}}==