Skip to content
Programmingoneonone
Programmingoneonone
  • Engineering Subjects
    • Internet of Things (IoT)
    • Digital Communication
    • Human Values
  • Programming Tutorials
    • C Programming
    • Data structures and Algorithms
    • 100+ Java Programs
    • 100+ C Programs
    • 100+ C++ Programs
  • Solutions
    • HackerRank
      • Algorithms Solutions
      • C solutions
      • C++ solutions
      • Java solutions
      • Python solutions
      • Data Structures Solutions
    • Leetcode Solutions
    • HackerEarth Solutions
  • Work with US
Programmingoneonone

Deletion in Circular Linked List Data Structure | DSA Tutorials

YASH PAL, 23 May 20204 May 2026

Deletion in Circular Linked List – To perform deletion in a circular linked list, we need to maintain and store the reference of the last node of the list. Because using the reference of the last node, the deletion operation can be done in constant time.

Deletion in Circular Linked List

So in this tutorial, we are going to learn how to

  1. Deletion of the first node in the circular linked list.
  2. Delete the only node of the list.
  3. Delete the last node of the list.
  4. Delete a node at any position in the list.

Delete the first node of the circular linked list

Let’s say we have a list that has four nodes in it.

Deletion in Circular Linked List
Figure 1: Delete the first node of the circular linked list

To delete the first node of the list, we simply store the second node’s reference in the last node’s link part.

Deletion in Circular Linked List

Now the first node is deleted from the linked list.

Deletion in Circular Linked List

Delete the only node

If we have a linked list that has only one node.

Deletion in Circular Linked List
Figure 2: Delete the only node

Then, to delete this only node, we simply store None or a null value into the last variable.

Deletion in Circular Linked List

So now our list becomes empty.

Deletion in Circular Linked List

Delete the last node

To delete the last node first, we need to find a reference p of the predecessor of the last node.

Deletion in Circular Linked List
Figure 3: Delete the last node

Then we store the first node’s reference into the linked part of node p.

Deletion in Circular Linked List

After that, we update the list variable’s position. Because after the deletion of the last node, the node p becomes the last node of the list.

Deletion in Circular Linked List

So now, after performing these operations, the last node is deleted.

Deletion in Circular Linked List

Delete a node at the kth position

To delete a node at position x, first, we need to find the reference to the predecessor of the node. Like we want to delete the third node on the list. Then we need to find the reference p of the second node.

Deletion in Circular Linked List

After that, we store the node’s reference that comes after the node that we want to delete in the linked part of node p.

Deletion in Circular Linked List

So now the third node’s deleted from the linked list.

Deletion in Circular Linked List

Data Structures & Algorithms Tutorials for Beginners
Computer Science Tutorials Data Structures Tutorials computer scienceData StructureDSA Tutorials

Post navigation

Previous post
Next post

Leave a Reply

Your email address will not be published. Required fields are marked *

Programmingoneonone

We at Programmingoneonone, also known as Programming101 is a learning hub of programming and other related stuff. We provide free learning tutorials/articles related to programming and other technical stuff to people who are eager to learn about it.

Pages

  • About US
  • Contact US
  • Privacy Policy

Practice

  • Java
  • C++
  • C

Follow US

  • YouTube
  • LinkedIn
  • Facebook
  • Pinterest
  • Instagram
©2026 Programmingoneonone | WordPress Theme by SuperbThemes