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 > 01
THEN # non-emptymore arraythan one element, so must sort #
INT gap := input size; # initial gap is the whole array size #
BOOL swapped := TRUE;
3,038

edits