标签:一个 for 长度 输出 class highlight pre pytho and
输入:n个数组成的一个序列
输出:从小到大排序好的序列
以下是伪代码
其中A是输入序列
A.length是A的长度
for j = 2 to A.length
key = A[j]
i = j - 1
while i > 0 and A[i] > key
A[i + 1] = A[i]
i = i - 1
A[i + 1] = key
标签:一个 for 长度 输出 class highlight pre pytho and
原文地址:https://www.cnblogs.com/gxxtsz/p/12180587.html