procedure bubbleSort(A : list of sortable items) n = length(A) repeat newn = 0 for i = 1 to n-1 ...

procedure bubbleSort(A : list of sortable items) n = length(A) repeat newn = 0 for i = 1 to n-1 ...

More to explore