Insert algorithm; Var i,k,x: integer; T[1..n]: integer; Start read(s); n:=n+1; for i from n to k not-1 faire T[i+1] := T[i]; finfaire T[k] := x; End |
Procedure insert(L:list,k:1..lmax, x:element) var i,n:1..lmax; Start n := L.length; L.Length:= n+1; for i from n to k not-1 faire L.T[i+1] := L.T[i]; finfaire L.T[i] := x; End |
Please disable your ad blocker and refresh the window to use this website.