Sorting algorithms/Bubble sort: Difference between revisions

Content added Content deleted
Line 660: Line 660:
begin
begin
L:= Low(A) + 1;
L:= Low(A) + 1;
K:= High(A);
repeat
repeat
K:= High(A);
for J:= High(A) downto L do begin
for J:= High(A) downto L do begin
if A[J - 1] > A[J] then begin
if A[J - 1] > A[J] then begin