Sorting Algorithms/Circle Sort: Difference between revisions

m
Undo revision 218956 by Trizen (talk)
m (Moved into category "Sorting algorithms" (with lowercase "a"))
m (Undo revision 218956 by Trizen (talk))
Line 1:
{{draft task|Sorting Algorithms}}{{Sorting algorithmsalgorithm}}
Sort an array of integers (of any convenient size) into ascending order using Circlesort. In short, compare the first element to the last element, then the second element to the second last element, etc. Then split the array in two and recurse until there is only one single element in the array, like this:
Before:
2,747

edits