FLAG←n //标记被交换的最后元素位置 while FLAG > 1 do k←FLAG-1 FLAG←1 for j=1 to k do if L(j) > L(j+1) then do L(j) ↔ L(j+1) FLAG ←j