Sorting Algorithms/Circle Sort: Difference between revisions

Undo revision 254839 by FreeTom (talk)
(→‎{{header|Lua}}: Removed needless extra 'if' block present in RC pseudocode but not sourceforge example)
(Undo revision 254839 by FreeTom (talk))
Line 622:
lo = lo + 1
hi = hi - 1
end
if lo == hi then
if t[lo] > t[hi + 1] then
t[lo], t[hi + 1] = t[hi + 1], t[lo]
swaps = swaps + 1
end
end
swaps = innerCircle(t, low, low + mid, swaps)
Anonymous user