Sorting algorithms/Cocktail sort: Difference between revisions
Content deleted Content added
→version handles non-blanks: Explain the "simpler swap mechanism" |
imported>Arakov |
||
Line 1,742:
=={{header|Elena}}==
ELENA
<syntaxhighlight lang="elena">import extensions;
import system'math;
Line 1,758:
swapped := false;
for(int i := 0
{
if (list[i]>list[i+1])
Line 1,772:
swapped := false;
for(int i := list.Length - 2
{
if (list[i]>list[i+1])
|