Skip to content

Commit

Permalink
Agregando los insertar
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian-Martinez-Rincon committed Dec 9, 2023
1 parent a2313f4 commit af0c5f4
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion _posts/2023-8-17-Computabilidad.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,42 @@ Si te toca este final, tenes 2 opciones nada más.
Para ambos temas te tenes que saber si o si:
- Insertar Ordenado
- Agregar Adelante
- Agregar Atras
- Agregar Atras

#### Basicos

<table>
<tr><td>Agregar Adelante</td><td>Agregar Atras</td></tr>
<tr><td>

```pascal
Procedure AgregarAdelante (var L:lista; x:integer);
Var
nue:Lista;
Begin
New(nue);
nue^.datos:=x;
nue^.sig:=L;
L:=nue;
End;
```
</td><td>

```pascal
procedure AgregarAlFinal2(var pri,ult:lista;x:integer);
var
nue : lista;
begin
new (nue);
nue^.dato:= x;
nue^.sig := NIL;
if pri <> Nil then
ult^.sig := nue
else
pri := nue;
ult := nue;
end;
```
</td></tr>
</table>

0 comments on commit af0c5f4

Please sign in to comment.