DS - Doubly Linked List
DS - Doubly Linked List
Head
if( temp->data == x ){
temp->prev->next = temp-next;
temp->next->prev = temp->prev;
toDelete = temp;
delete toDelete;
}
temp = temp->next;
}
}
Computer Science Department
Advantages of Doubly Linked List
1. The doubly linked list is bi-directional, i.e. it can be
traversed in both backward and forward direction.