Presentation is loading. Please wait.

Presentation is loading. Please wait.

Circular linked list A circular linked list is a linear linked list accept that last element points to the first element.

Similar presentations


Presentation on theme: "Circular linked list A circular linked list is a linear linked list accept that last element points to the first element."— Presentation transcript:

1 Circular linked list A circular linked list is a linear linked list accept that last element points to the first element.

2 Header linked list A header linked list is a list which always contain a special node, called the header node, at the beginning of the list. Two kind of header lists…. 1.Grounded header list 2.Circular header list

3 Algorithm on circular header list Traversing a circular header list Searching a circular header list Insertion a circular header list Deletion a circular header list Algorithms for grounded header linked list are same as ordinary link list but with a small difference of initializing the counter variable.

4 Two way linked list OR Doubly linked list A two way linked list is a linear collection of data elements, called nodes where each node is divided into three parts : An information field INFO which contains the data of N A pointer field FORW which contains the location of the next node in the list A pointer field BACK which contains the location of proceeding node in the list

5 Two way link list also contain two pointer variables FIRST and LAST FIRST points to the first node in the list LAST points to the last node in the list A two way linked list contain 2 null pointers in the first node and in the last node We also have a TWO WAY HEADER LINK LIST

6 Operation on two way link list Traversing Searching Insertion Deletion design algo for all above operations

7 Comparison of arrays and linked list Arrays Its elements are stored in contiguous memory locations System keeps track of address of the first element only, and other elements are accessed by computing their addresses at the execution time using formula for address calculation Linked list Its elements are stored in contiguous memory locations System keeps track of address of the first element only, and other elements are accessed following the chain of pointers


Download ppt "Circular linked list A circular linked list is a linear linked list accept that last element points to the first element."

Similar presentations


Ads by Google