插入算法; Var i,k,x:整数; T[1..n]:整数; 开始 阅读; n:=n+1; 对于从 N 到 K 的 i not-1 faire T[i+1] := T[i]; finfaire T[k] := x; End |
过程 insert(L:list,k:1..lmax, x:element) var i,n:1..lmax; Start n := L.长度; L.Length:= n+1; 对于从 N 到 K 的 i not-1 faire L.T[i+1] := L.T[i]; finfaire L.T[i] := x; 结束跨度> |
Please disable your ad blocker and refresh the window to use this website.