Jump to content
cosztynel

Liste ...

Recommended Posts

Posted

daca lista este simplu inlantuita, si pointerul p arata catre primul element din lista atunci:


copie = p;
p = p->next //ne pozitionam pe al doilea element din lista

cat timp p != null executa
temp = p; //retinem elementul curent
p = p->next; //ne mutam pe urmatorul element din lista
delete temp; //si il stergem pe cel de dinaintea lui
end cat timp

p = copie; //ne repozitionam pe primul nod al listei

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...