73.insert in LL PDF
73.insert in LL PDF
73.insert in LL PDF
#include <stdio.h>
#include <stdlib.h>
struct Node
{
int data;
struct Node *next;
}*first=NULL;
for(i=1;i<n;i++)
{
t=(struct Node*)malloc(sizeof(struct Node));
t->data=A[i];
t->next=NULL;
last->next=t;
last=t;
}
}
if(index == 0)
{
t->next=first;
first=t;
}
else
{
for(i=0;i<index-1;i++)
p=p->next;
t->next=p->next;
p->next=t;
int main()
{
int A[]={10,20,30,40,50};
create(A,5);
Insert(first,0,5);
Display(first);
return 0;
}