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:


Circular Singly Linked List


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.


Circular Doubly Linked List


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:

Similar Reads

What is Linked List?

A linked list is a linear data structure, in which the elements are not stored at contiguous memory locations. Linked list consists of nodes where each node contains a data field and a reference(link) to the next node in the list....

Singly Linked List:

A singly linked list is a linear data structure in which the elements are not stored in contiguous memory locations and each element is connected only to its next element using a pointer....

Doubly Linked List:

A doubly linked list (DLL) is a special type of linked list in which each node contains a pointer to the previous node as well as the next node of the linked list....

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....

Applications of Linked List:

Image viewer – Previous and next images are linked and can be accessed by the next and previous buttons.Previous and next page in a web browser – We can access the previous and next URL searched in a web browser by pressing the back and next buttons since they are linked as a linked list.Music Player – Songs in the music player are linked to the previous and next songs. So you can play songs either from starting or ending of the list.GPS navigation systems– Linked lists can be used to store and manage a list of locations and routes, allowing users to easily navigate to their desired destination....

Advantages of Linked Lists:

Dynamic Size: Linked lists can grow or shrink dynamically, as memory allocation is done at runtime.Insertion and Deletion: Adding or removing elements from a linked list is efficient, especially for large lists.Flexibility: Linked lists can be easily reorganized and modified without requiring a contiguous block of memory....

Disadvantages of Linked Lists:

Random Access: Unlike arrays, linked lists do not allow direct access to elements by index. Traversal is required to reach a specific node.Extra Memory: Linked lists require additional memory for storing the pointers, compared to arrays....

Gate Archives on Linked List:

Q1. Consider the problem of reversing a singly linked list. To take an example, given the linked list below,...