Skip to content

Commit

Permalink
ordenacion de vectores por insercion
Browse files Browse the repository at this point in the history
  • Loading branch information
OmgCopito95 committed Sep 13, 2020
1 parent ad5657f commit e796c8c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions VECTORES/ordenacion_insercion.pas
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// ORDENACION DE VECTORES POR INSERCION

procedure OrdenacionPorInsercion(var v: vector);
var
i, j, dato: integer;
begin

for i:= 2 to dimF do begin
actual:=v[i];
j:= i-1;
while (j > 0) and (v[j] > actual) do begin
v[j+1]:=v[j];
j := j-1;
end;
v[j+1] := actual;
end;
end;


0 comments on commit e796c8c

Please sign in to comment.