Sorting algorithms/Comb sort: Difference between revisions
m
→{{header|ALGOL 68}}: no point sorting a single-element array
m (→{{header|ALGOL 68}}: no point sorting a single-element array) |
|||
Line 502:
PROC comb sort = ( REF[]INT input )VOID:
IF INT input size = ( UPB input - LWB input ) + 1;
input size >
THEN #
INT gap := input size; # initial gap is the whole array size #
BOOL swapped := TRUE;
|