Sorting algorithms/Comb sort: Difference between revisions

m
→‎{{header|C sharp|C#}}: gap not less than 1 check
m (lost } added)
m (→‎{{header|C sharp|C#}}: gap not less than 1 check)
Line 182:
{
gap /= 1.247330950103979;
if ( gap < 1 ) { gap = 1; }
int i = 0;
swaps = false;
Line 202 ⟶ 203:
}
</lang>
 
=={{header|Forth}}==
This is an implementation of Comb sort with a different ending. Here [[Gnome sort]] is used, since it is rather small. The dataset is rather large, because otherwise the Comb sort routine would never kick in, passing control to Gnome sort almost right away. Note Comb sort can be kept much simpler this way, because Combsort11 optimizations and swapped flags can be discarded.