📅  最后修改于: 2022-03-11 14:57:05.106000             🧑  作者: Mango
代码示例3
INSERTION-SORT(A)
for i = 1 to n
key ← A [i]
j ← i – 1
while j > = 0 and A[j] > key
A[j+1] ← A[j]
j ← j – 1
End while
A[j+1] ← key
End for