Doubly Linked List
Doubly Linked List
Operations
n->next=i->next;
n->prev=i;
i->next=n;
n->next->prev=n;
}
}
Display
void display()
{
struct node *i; Running Time!?
for(i=head;i!=NULL;i=i->next)
{
printf("%d-->",i->data);
}
}
Display in Reverse
void display()
{
struct node *i; Running Time!?
for(i=tail;i!=NULL;i=i->prev)
{
printf("%d-->",i->data);
}
}
Delete at Begin
Delete End
head tail
Delete Middle