Types of Linked ListA linked list is a linear data structure, in which the elements are not stored at contiguous memory locations. The elements in a linked list are linked using pointers. In simple words, a linked list consists of nodes where each node contains a data field and a reference(link) to the next node in the list. Show Types Of Linked List
C++
Java
Python3
C#
Javascript
C++
Java
C#
Python3
Javascript
Output
1 2 3
C++
Java
Python3
C#
C++
Java
Python3
C#
Output
Created DLL is:
Traversal in forward direction
1 7 6
Traversal in reverse direction
6 7 1
C++
Java
Python3
C#
C++
Java
Python3
C#
Output
Contents of Circular Linked List
11 2 56 12
C++
Java
Python3
C#
C++
Java
Python3
C#
Output
Created circular doubly linked list is:
Traversal in forward direction
7 4 5
Traversal in reverse direction
5 4 7
C++
Python3
Java
C#
C++
Java
Python3
C#
Output
List After inserting 3 elements:
11 12 13
List After inserting 2 more elements:
11 12 13 14 15
Article Tags :
Data Structures Linked List
circular linked list doubly linked list Linked Lists Practice Tags :
Data Structures Linked List circular linked list Grounded Header Linked ListIn this type of Header Linked List, the last node of the list points to NULL or holds the reference to NULL Pointer. The head pointer points to the Header node of the list. If the there is no node to the next of head pointer or head.next equals NULL then we know that the Linked List is empty. The operations performed on the Header Linked List are same as Singly Linked List such as Insertion, Deletion, and Traversal of nodes. Let us understand this with an example: The above image shows a Grounded Header Linked List. We can see the Header Node at the beginning followed by the actual nodes of the list where the last node points to NULL. The header node maintains global information about the list. Firstly, we have to create Header Node first whose data field will be NULL or 0 initially. After that we can perform any operations on that linked list and store the global information about the linked list on the header node. Here, we store the count or Total no. of nodes present in the Linked List, the Maximum and Minimum value among all nodes in the list. So, in the above Linked List Total Nodes are 4 , Maximum Value is 99 and Minimum value is 5 which are present as fields in Header Node. Header Linked ListA Header linked list is one more variant of linked list. In Header linked list, we have a special node present at the beginning of the linked list. This special node is used to store number of nodes present in the linked list. In other linked list variant, if we want to know the size of the linked list we use traversal method. But in Header linked list, the size of the linked list is stored in its header itself. Data Structure - Circular Linked ListAdvertisements Previous Page Next Page Circular Linked List is a variation of Linked list in which the first element points to the last element and the last element points to the first element. Both Singly Linked List and Doubly Linked List can be made into a circular linked list. |