28-03-2011, 03:30 PM
Presented by
Joydip Ghosh
SEMINAR ON LINKED LIST.pptx (Size: 403.13 KB / Downloads: 120)
SEMINAR ON LINKED LIST (CIRCULAR AND DOUBLE)
What is Linked-List
In computer science, a linked list is a data structure that consists of a sequence of data records such that in each record there is a field that contains a reference (i.e., a link) to the next record in the sequence.
Single linked list
This is the most basic type of linked list, with each node containing a single pointer, to the next node.
Multi linked list
More advanced than the single linked list, each node may be connected to many other nodes.
Special case : Doubly linked lists
Circular linked list
With a circular linked list, the last node is connected to the first, to form a circle.
MULTI OR DOUBLY LINKED LIST
In computer science, a doubly-linked list is a linked data structure that consists of a set of data records, each having two special link fields that contain references to the previous and to the next record in the sequence. It can be viewed as two singly-linked lists formed from the same data items, in two opposite orders.
Basic Structure Of Double Linked List
data: the user's data
next, prev: the address of the next and previous node in the list
Creation Of Single Node
Empty Doubly Linked List
Inserting into a Doubly Linked List
Deleting an element from a double linked list
oldNode=current;
oldNode->prev->next = oldNode->next;
oldNode->next->prev = oldNode->prev;
current = oldNode->prev;
delete oldNode;
Deleting an element from a double linked list