2.14 Circular Linked List in Data Structure | Creation and
Display | DSA Course
Jenny's Lectures CS IT
A circular linked list is a singly linked list with four nodes. Each node is having two parts one is
data part one is address part and one is the next. The addresses would be in ascending order
or descending order. Any random address can be dynamically allocated to these nodes. A
circular linked list is the same as singly linked list in the previous video I all provided the link of
that video in this I button you can check out there first of all we consider what the list is empty
we do n't have any node in the list so you can say head as what 0 head is equal to null. Milo will
return what the pointer to this node is. The smell of Milo means memory has been allocated how
much memory for this truck node. We will ask from the user which data I want to insert using
printf and scanf. that is malik will return what this 200 so we are going to store this 200. We will
store this value in this point our new node pointer. We need a pointer pointer pointer to this
node is what a new node.
Head is equal to new node in that case so we need to move head for accessing in in this case
after inserting two nodes I 'm on pins are this one so I I 'll put here rather than 0 I want to store
here 300 so that I can establish a link to this tool but how I can access this part of this node is
how we need another pointer you can set em. We will use temple now because we can not
move this head so temp next so here I will write what temp off next is equal to here I want to
store address of this node 150 from fair I can get 150 in new node point that we have 150 right
and now here I have 150 so now in temples so we are having 150 MV is pointing to this node.
This is how you can create a circular linked list the see this is not the only way to create circular
link list. After inserting three temp will be pointing to the last node right now temp is pointing to
this node so in printf what you can print em next m p -- next means this thing right 200.
See this pointer is this node is having a pointer temp and head also but we will use time
because move this temp temp temp off data so have you can print suppose it printf I can write
what percentage D and temp data this is how you can access this part of this node camp and
the name of this part is aro data part fine so now this will print what seven. Using this I can not
print this thing so after this you will write one more line that has printf percentage be how you
can print this one because temp is pointing to this node after this while loop so here I can write
temp of data temp data means 1 would be printed here right. In next video we will see how to
insert a data in a circular linked list.
Display | DSA Course
Jenny's Lectures CS IT
A circular linked list is a singly linked list with four nodes. Each node is having two parts one is
data part one is address part and one is the next. The addresses would be in ascending order
or descending order. Any random address can be dynamically allocated to these nodes. A
circular linked list is the same as singly linked list in the previous video I all provided the link of
that video in this I button you can check out there first of all we consider what the list is empty
we do n't have any node in the list so you can say head as what 0 head is equal to null. Milo will
return what the pointer to this node is. The smell of Milo means memory has been allocated how
much memory for this truck node. We will ask from the user which data I want to insert using
printf and scanf. that is malik will return what this 200 so we are going to store this 200. We will
store this value in this point our new node pointer. We need a pointer pointer pointer to this
node is what a new node.
Head is equal to new node in that case so we need to move head for accessing in in this case
after inserting two nodes I 'm on pins are this one so I I 'll put here rather than 0 I want to store
here 300 so that I can establish a link to this tool but how I can access this part of this node is
how we need another pointer you can set em. We will use temple now because we can not
move this head so temp next so here I will write what temp off next is equal to here I want to
store address of this node 150 from fair I can get 150 in new node point that we have 150 right
and now here I have 150 so now in temples so we are having 150 MV is pointing to this node.
This is how you can create a circular linked list the see this is not the only way to create circular
link list. After inserting three temp will be pointing to the last node right now temp is pointing to
this node so in printf what you can print em next m p -- next means this thing right 200.
See this pointer is this node is having a pointer temp and head also but we will use time
because move this temp temp temp off data so have you can print suppose it printf I can write
what percentage D and temp data this is how you can access this part of this node camp and
the name of this part is aro data part fine so now this will print what seven. Using this I can not
print this thing so after this you will write one more line that has printf percentage be how you
can print this one because temp is pointing to this node after this while loop so here I can write
temp of data temp data means 1 would be printed here right. In next video we will see how to
insert a data in a circular linked list.