Circular Linked List
The circular linked list is a linked list where all nodes are connected to form a circle. In a circular linked list, the first node and the last node are connected to each other which forms a circle. There is no NULL at the end.
The elements in a linked list are linked using pointers to the next node with the last node pointing to the head of the linked list as shown in the below image:
All operations of Circular Singly Linked List are same as of Singly Linked List.
There are two types of Circular Linked List:
- Circular singly linked list: In a circular Singly linked list, the last node of the list contains a pointer to the first node of the list. We traverse the circular singly linked list until we reach the same node where we started. The circular singly linked list has no beginning or end. No null value is present in the next part of any of the nodes.
- Circular Doubly linked list: Circular Doubly Linked List has properties of both doubly linked list and circular linked list in which two consecutive elements are linked or connected by the previous and next pointer and the last node points to the first node by the next pointer and also the first node points to the last node by the previous pointer.
Note: Unlike other types of Linked Lists, Circular Doubly Linked List takes O(1) time for insertion or deletion at the end of the Linked List.
Linked List Notes for GATE Exam [2024]
The “Linked List Notes for GATE Exam” is a comprehensive resource designed to aid students in preparing for the Graduate Aptitude Test in Engineering (GATE). Focused specifically on the topic of linked lists, a fundamental data structure in computer science, these notes offer a detailed and structured approach to mastering this subject within the context of the GATE examination.
Table of Content
- What is Linked List?
- Singly Linked List
- Doubly Linked List
- Circular Linked List
- Applications of Linked List
- Advantages of Linked Lists
- Disadvantages of Linked Lists
- Previous Year GATE Questions on Linked List: