Professional Documents
Culture Documents
هياكل البيانات -نظري 4
هياكل البيانات -نظري 4
node=
Data Link
10 50 60
:advantages a
disadvantage: sguall
10 20
---|AIB]= Ic||D[
Prey Prev Prev
struct node int data; node * next;};
node *head-NULL,*n=NULL;
#ludestrear
using naNespace std; 3
head-NULL, 'n-NULL:
student sl:
12 for (int i . i i
13
14 cout "ENLeI the id:="
15 Cin$1.10:
toutr Enter the ranE;= 4
cins1.dephane:
26 43
cin>51. Agt
tteatfNcd: head sl:
24
2
returo ;
n=1001 40 NULL if (head==NULL) head=tail=n;else {tail->next=n;tail=n;}
head-1000
node * p=head;
cout<<p->data;
pp->next;