Anonymous user
Talk:Sorting algorithms/Cocktail sort: Difference between revisions
Talk:Sorting algorithms/Cocktail sort (view source)
Revision as of 08:20, 28 June 2015
, 8 years ago→Typos?: Uhhh
Underscore (talk | contribs) No edit summary |
(→Typos?: Uhhh) |
||
Line 9:
Thanks, corrected. -- [[User:Gerard Schildberger|Gerard Schildberger]] 09:10, 4 July 2012 (UTC)
==Uhhhhh==
I think the stated algorithm has a bug. Try sorting (2,1).
The fix is to change the first for each to "0 to length(A) - 1", not -2. Note that animation in the Wikipedia article doesn't match the algorithm either.
--[[User:craigd|craigd]]
|