Linked List

Linked list is a linear data structure, consists of nodes where each node contains a data field and a reference to the next node in the list. It is used in many algorithms for solving real-time problems, when the number of elements to be stored is unpredictable and also during sequential access of elements. Linked list allows insertion and deletion of any element at any location. There are two types of linked list, Single Linked List and Double Linked List.

Circular single linked list is a type of data structure that is made up of nodes that are created using self referential structures. Each of these nodes contain two parts, namely the data and the reference to the next list node. Only the reference to the first list node is required to access the whole linked list. This is known as the head. The last node in the list points to head or first node of the list. That is the reason this is known as a circular linked list. In circular, last node contains a pointer to the first node. We can have a Circular Single Linked List as well as a Circular Double Linked List. There is no storing of NULL values in the list.

Double Linked List is a linked list data structure with two link, one that contain reference to the next data and one that contain reference to the previous data. Double Linked List is a variation of linked list in which navigation is possible in both ways, either forward and backwars easily as compared to Single Linked List.

Circular Double Linked List is similar with Circular Single Linked List, but total pointer in each node here is two pointers. Circular Double Linked List is a more complexed type of data structure in which a node contain pointers to its previous node as well as the next node. Circular Double Linked List does not contain NULL in any of the node. The last node of the list contains the address of the first node of the list. The first node of the list also contain address of the last node in its previous pointer.


Comments

Popular posts from this blog

AVL Tree dan B-Tree

Hashing and Hash Tables, Trees & Binary Tree

Binary Search Tree