Apr 5, 2009

LINKED LIST

5.1 INTRODUCTION
Linked lists are special list of some data element pointing to one another.The logical ordering is represented by having each element pointing to the next element.Each element is called a node, which has two parts.INFO part which stores the information and POINTER which points to the next element.

5.2 OPERATIONS ON LINKED LIST
The basic operation to be performed on linked list are as follows :
1. Creation 2. Insertion
3. Deletion 4. Traversing
5. searching 6.Concatenation
7.Display

5.3 TYPES OF LINKED LIST
1. Singly linked list 2. Doubly linked list
3. Circular linked list 4. Circular Doubly linked list

SINGLY LINKED LIST
singly linked list are known as one way list. In this one pointer is maintained , which points to the next node called the NEXT pointer. One can traverse the list in forward direction.

DOUBLY LINKED LIST
Doubly linked list are known as two way list. In this two pointers are maintained :One which points to the next node called the NEXT pointer and other which points to previous node called the PREV pointer. One can traverse the list both in forward as well as backward direction.

CIRCULAR LINKED LIST
A Circular Linked List is one which has no beginning and no end. In this two pointers are maintained: One which points to the next node called the NEXT pointer and other which points to previous node called the PREV pointer. One can traverse the list both in forward as well as backward direction. It is very similar to doubly linked list except that in doubly linked list the prev pointer of the first node and the next pointer of the last node points to NULL where as in circular linked list the last node contains the address of the first node and the last node contains the address of the first node. All operation are similar to doubly linked list

No comments:

Post a Comment