Circular Linked List
Circular Linked List
DATA STRUCTURES
Unit 1-Linear structures
Year/Sem : II/III
Subject Code: 1151CS102
Topic : Circular Linked list
Faculty Name : Mrs.S.Vijitha
Date : 13.08.2020
School of Computing
Vel Tech Rangarajan Dr. Sagunthala R&D Institute of
Science and Technology
Contents
and Project
Management
(SEPM)
and Project
Management
(SEPM)
and Project
Management
(SEPM)
1.Insertion
2.Deletion
3.Display
Insertion:
07/09/2021
Department of Computer Science and Engineering
Insertion Operation of Circular Linked list
Inserting At Beginning of the list:
07/09/2021
Department of Computer Science and Engineering
Insertion Operation of Circular Linked list
Inserting At Beginning of the list:
07/09/2021
Department of Computer Science and Engineering
Insertion Operation of Circular Linked list
Inserting At Beginning of the list:
07/09/2021
Department of Computer Science and Engineering
Insertion Operation of Circular Linked list
Inserting At end of the list:
07/09/2021
Department of Computer Science and Engineering
Insertion Operation of Circular Linked list
07/09/2021
Department of Computer Science and Engineering
Insertion Operation of Circular Linked list
Inserting At Specific location in the list (After a
Node)
07/09/2021
Department of Computer Science and Engineering
Insertion Operation of Circular Linked list
Inserting At Specific location in the list (After a
Node)
Deletion:
07/09/2021
Department of Computer Science and Engineering
Deletion Operation of Circular Linked list
Deleting from Beginning of the list:
07/09/2021
Department of Computer Science and Engineering
Deletion Operation of Circular Linked list
Deleting from Beginning of the list:
07/09/2021
Department of Computer Science and Engineering
Deletion Operation of Circular Linked list
Deleting at the end of the list:
07/09/2021
Department of Computer Science and Engineering
Deletion Operation of Circular Linked list
Deleting at the end of the list:
07/09/2021
Department of Computer Science and Engineering
Deletion Operation of Circular Linked list
07/09/2021
Department of Computer Science and Engineering
Deletion Operation of Circular Linked list
Deleting a Specific Node from the list:
Step 4 - Keep moving the temp1 until it reaches to the
exact node to be deleted or to the last node. And every
time set 'temp2 = temp1' before moving the 'temp1' to
its next node.
Step 7 - If list has only one node and that is the node to
be deleted then set head = NULL and
delete temp1 (free(temp1)).
07/09/2021
Department of Computer Science and Engineering
Display Operation of Circular Linked list
Displaying a circular Linked List:
07/09/2021
Department of Computer Science and Engineering
Types of circular Linked list
and Project
Management
(SEPM)
Also, for insertion and the end, the whole list has to
be traversed. If instead of start pointer we take a
pointer to the last node then in both the cases there
won’t be any need to traverse the whole list.
After insertion,
After inserting
After insertion
and Project
Management
(SEPM)
But now start pointer points to the first node the list.