title
2.16 Insertion in Circular Linked List | Data Structure Tutorials
description
In this video, I have written a C program for Inserting a Node in a Circular Linked List.
I have discussed all the cases of Insertion- (with example)
insertion at beginning
insertion at end
insertion at specific position
DSA Full Course: https: https://www.youtube.com/playlist?list=PLdo5W4Nhv31bbKJzrsKfMpo_grxuLl8LU
******************************************
See Complete Playlists:
C Programming Course: https://www.youtube.com/playlist?list=PLdo5W4Nhv31a8UcMN9-35ghv8qyFWD9_S
C++ Programming: https://www.youtube.com/playlist?list=PLdo5W4Nhv31YU5Wx1dopka58teWP9aCee
Python Full Course: https://www.youtube.com/playlist?list=PLdo5W4Nhv31bZSiqiOL5ta39vSnBxpOPT
Printing Pattern in C: https://www.youtube.com/playlist?list=PLdo5W4Nhv31Yu1igxTE2x0aeShbKtVcCy
DAA Course: https://www.youtube.com/playlist?list=PLdo5W4Nhv31ZTn2P9vF02bkb3SC8uiUUn
Placement Series: https://www.youtube.com/playlist?list=PLdo5W4Nhv31YvlDpJhvOYbM9Ap8UypgEy
Dynamic Programming: https://www.youtube.com/playlist?list=PLdo5W4Nhv31aBrJE1WS4MR9LRfbmZrAQu
Operating Systems: //www.youtube.com/playlist?list=PLdo5W4Nhv31a5ucW_S1K3-x6ztBRD-PNa
DBMS: https://www.youtube.com/playlist?list=PLdo5W4Nhv31b33kF46f9aFjoJPOkdlsRc
************************************************
Connect & Contact Me:
Facebook: https://www.facebook.com/Jennys-Lectures-CSIT-Netjrf-316814368950701/
Quora: https://www.quora.com/profile/Jayanti-Khatri-Lamba
Instagram: https://www.instagram.com/jayantikhatrilamba/
#circularlinkedlist, #jennyslectures, #linkedlist, #datastructures
detail
{'title': '2.16 Insertion in Circular Linked List | Data Structure Tutorials', 'heatmap': [{'end': 225.628, 'start': 125.809, 'weight': 0.806}, {'end': 296.714, 'start': 280.849, 'weight': 0.706}, {'end': 391.176, 'start': 350.841, 'weight': 0.753}, {'end': 617.703, 'start': 603.457, 'weight': 0.783}], 'summary': 'The tutorial covers circular linked list insertion, including insertion at the beginning, end, and specific positions, while highlighting node creation, memory allocation, pointer management, and ease of insertion using head and tail pointers.', 'chapters': [{'end': 64.887, 'segs': [{'end': 64.887, 'src': 'embed', 'start': 17.653, 'weight': 0, 'content': [{'end': 19.414, 'text': 'that also we have discussed in that video.', 'start': 17.653, 'duration': 1.761}, {'end': 26.521, 'text': 'in this video we will see how to insert a data in a circular linked list insertion at beginning,', 'start': 20.114, 'duration': 6.407}, {'end': 31.026, 'text': 'insertion at end and insertion at any specific position.', 'start': 26.521, 'duration': 4.505}, {'end': 35.291, 'text': 'so first of all we will see how to insert a new node at beginning of the list.', 'start': 31.026, 'duration': 4.265}, {'end': 41.717, 'text': "see, we are not having any head pointer, so we don't have any idea which node is the first node.", 'start': 35.291, 'duration': 6.426}, {'end': 46.359, 'text': 'but here still we can find out which is the first node, the address of the first node, how.', 'start': 41.717, 'duration': 4.642}, {'end': 51.92, 'text': 'as we know, in circular linked list, always the last node is containing address of the first node.', 'start': 46.359, 'duration': 5.561}, {'end': 57.282, 'text': 'this, this would be the address of the first node and we have a pointer to the last node.', 'start': 51.92, 'duration': 5.362}, {'end': 58.782, 'text': 'that is tail pointer.', 'start': 57.282, 'duration': 1.5}, {'end': 60.763, 'text': 'so you can say tail of next.', 'start': 58.782, 'duration': 1.981}, {'end': 64.887, 'text': 'this is what address of the first node right.', 'start': 61.423, 'duration': 3.464}], 'summary': 'The video explains insertion in a circular linked list, covering insertion at the beginning, end, and any specific position.', 'duration': 47.234, 'max_score': 17.653, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ReGglEXEH08/pics/ReGglEXEH0817653.jpg'}], 'start': 0.089, 'title': 'Circular linked list insertion', 'summary': 'Discusses the implementation of circular linked list insertion, covering insertion at the beginning, end, and any specific position, with a focus on finding the address of the first node and using a tail pointer to manage insertion.', 'chapters': [{'end': 64.887, 'start': 0.089, 'title': 'Circular linked list insertion', 'summary': 'Discusses the implementation of circular linked list, including insertion at the beginning, end, and any specific position, with a focus on finding the address of the first node and using a tail pointer to manage insertion.', 'duration': 64.798, 'highlights': ['The last node in a circular linked list contains the address of the first node, enabling the identification of the first node without a head pointer.', 'The video covers insertion at the beginning, end, and any specific position in a circular linked list.', "The use of a tail pointer allows for the identification of the first node through 'tail of next' operation."]}], 'duration': 64.798, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ReGglEXEH08/pics/ReGglEXEH0889.jpg', 'highlights': ['The last node in a circular linked list contains the address of the first node, enabling the identification of the first node without a head pointer.', "The use of a tail pointer allows for the identification of the first node through 'tail of next' operation.", 'The video covers insertion at the beginning, end, and any specific position in a circular linked list.']}, {'end': 738.876, 'segs': [{'end': 110.081, 'src': 'embed', 'start': 64.887, 'weight': 0, 'content': [{'end': 69.372, 'text': 'so now to insert a node at the beginning, first of all, obviously we are going to create a node,', 'start': 64.887, 'duration': 4.485}, {'end': 72.816, 'text': 'and how to create a node that we have already discussed.', 'start': 69.372, 'duration': 3.444}, {'end': 77.321, 'text': 'this is how you can define your own data type, how you can have to represent a node.', 'start': 72.816, 'duration': 4.505}, {'end': 79.284, 'text': 'this thing we have already discussed many times.', 'start': 77.321, 'duration': 1.963}, {'end': 86.12, 'text': "here i am maintaining only the tail pointer, So now I'm defining a function insert at beginning.", 'start': 79.284, 'duration': 6.836}, {'end': 91.741, 'text': 'Fine So obviously we are going to create a new node for inserting that node here.', 'start': 86.6, 'duration': 5.141}, {'end': 96.082, 'text': 'So for that, what that method, the dynamic memory location will be used.', 'start': 92.021, 'duration': 4.061}, {'end': 101.884, 'text': 'And so in that case, you will have to declare a pointer that is new node pointer.', 'start': 96.623, 'duration': 5.261}, {'end': 106.519, 'text': 'And this new node pointer is going to store address of that newly created node.', 'start': 103.137, 'duration': 3.382}, {'end': 110.081, 'text': 'And how to allocate memory to newly created node using malloc function.', 'start': 106.559, 'duration': 3.522}], 'summary': 'Insert a node at the beginning using a new node and malloc function.', 'duration': 45.194, 'max_score': 64.887, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ReGglEXEH08/pics/ReGglEXEH0864887.jpg'}, {'end': 225.628, 'src': 'heatmap', 'start': 125.809, 'weight': 0.806, 'content': [{'end': 130.431, 'text': 'that is 7 and here in the next part we have inserted 0.', 'start': 125.809, 'duration': 4.622}, {'end': 134.033, 'text': 'it means it is not pointing to any node and this pointer is a new node.', 'start': 130.431, 'duration': 3.602}, {'end': 135.574, 'text': 'this node is containing this address.', 'start': 134.033, 'duration': 1.541}, {'end': 136.074, 'text': 'that is 600.', 'start': 135.574, 'duration': 0.5}, {'end': 139.055, 'text': 'fine. this concept we have discussed many times.', 'start': 136.074, 'duration': 2.981}, {'end': 143.397, 'text': 'so now i want to insert this node here at the beginning of this list right.', 'start': 139.055, 'duration': 4.342}, {'end': 146.739, 'text': 'so now, first of all you can check if the list is empty.', 'start': 143.397, 'duration': 3.342}, {'end': 148, 'text': 'in that case, what you will do?', 'start': 146.739, 'duration': 1.261}, {'end': 148.88, 'text': 'how you will check?', 'start': 148, 'duration': 0.88}, {'end': 151.021, 'text': "we don't have any head pointer, we have only tail pointer.", 'start': 148.88, 'duration': 2.141}, {'end': 154.943, 'text': 'so here you can check if tail is equal to is equal to zero.', 'start': 151.021, 'duration': 3.922}, {'end': 160.986, 'text': 'it means there is no node in the list and then this node would be the first and last node in the list, right.', 'start': 154.943, 'duration': 6.043}, {'end': 162.547, 'text': 'so how you will insert this thing?', 'start': 160.986, 'duration': 1.561}, {'end': 164.888, 'text': 'also, we have discussed how you will do this thing.', 'start': 162.547, 'duration': 2.341}, {'end': 170.21, 'text': 'suppose there is no node, we have only tail pointer and tail is containing zero and we have created this node.', 'start': 164.888, 'duration': 5.322}, {'end': 170.791, 'text': 'so what you will do?', 'start': 170.21, 'duration': 0.581}, {'end': 173.423, 'text': 'this would be the first node.', 'start': 172.062, 'duration': 1.361}, {'end': 177.465, 'text': 'so now tail would point to this node only, and this is the last node also.', 'start': 173.423, 'duration': 4.042}, {'end': 181.328, 'text': 'so here you can see in tail we will store what.', 'start': 177.465, 'duration': 3.863}, {'end': 183.409, 'text': 'this this address, that is new node.', 'start': 181.328, 'duration': 2.081}, {'end': 186.858, 'text': 'so now in tail 600 would be stored.', 'start': 184.997, 'duration': 1.861}, {'end': 188.999, 'text': 'so now tail would point here.', 'start': 186.858, 'duration': 2.141}, {'end': 193.821, 'text': 'one more thing in circular list, the last node would contain address of the first node.', 'start': 188.999, 'duration': 4.822}, {'end': 195.341, 'text': 'so this is the first and last node.', 'start': 193.821, 'duration': 1.52}, {'end': 199.083, 'text': 'so this node, this, this will contain address of itself.', 'start': 195.341, 'duration': 3.742}, {'end': 200.443, 'text': 'so now here we will store 600.', 'start': 199.083, 'duration': 1.36}, {'end': 203.124, 'text': 'so now how to access this part.', 'start': 200.443, 'duration': 2.681}, {'end': 204.625, 'text': 'new node next.', 'start': 203.124, 'duration': 1.501}, {'end': 212.428, 'text': 'or you can say this tail of next, tail of next, is equal to new node.', 'start': 204.625, 'duration': 7.803}, {'end': 218.624, 'text': 'right. this is how you can insert the very first node.', 'start': 214.721, 'duration': 3.903}, {'end': 222.386, 'text': 'or you can say if list is empty, then you can write down these line.', 'start': 218.624, 'duration': 3.762}, {'end': 225.628, 'text': 'else if list is not empty now, suppose this is the case.', 'start': 222.386, 'duration': 3.242}], 'summary': 'Inserting a new node at the beginning of a list, checking if the list is empty, and updating the tail pointer.', 'duration': 99.819, 'max_score': 125.809, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ReGglEXEH08/pics/ReGglEXEH08125809.jpg'}, {'end': 303.056, 'src': 'heatmap', 'start': 280.849, 'weight': 0.706, 'content': [{'end': 290.175, 'text': 'next. here i can write new node next is equal to tail of next.', 'start': 280.849, 'duration': 9.326}, {'end': 292.697, 'text': 'how you can access this part, pointer to this node, is tail.', 'start': 290.175, 'duration': 2.522}, {'end': 293.798, 'text': 'tail of next.', 'start': 292.697, 'duration': 1.101}, {'end': 296.714, 'text': 'now, see here.', 'start': 295.293, 'duration': 1.421}, {'end': 299.275, 'text': 'now tail of next is containing 100.', 'start': 296.714, 'duration': 2.561}, {'end': 301.216, 'text': 'so here i have stored 100.', 'start': 299.275, 'duration': 1.941}, {'end': 303.056, 'text': 'now this is pointing to this node.', 'start': 301.216, 'duration': 1.84}], 'summary': 'Pointer points to tail node containing 100.', 'duration': 22.207, 'max_score': 280.849, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ReGglEXEH08/pics/ReGglEXEH08280849.jpg'}, {'end': 394.798, 'src': 'heatmap', 'start': 336.694, 'weight': 2, 'content': [{'end': 339.956, 'text': 'that is the insertion at the beginning of circular linked list.', 'start': 336.694, 'duration': 3.262}, {'end': 348.7, 'text': 'and now, if you want to check that you have inserted correctly or not, then what you can do the same funda here, after this else, before closing this,', 'start': 339.956, 'duration': 8.744}, {'end': 350.841, 'text': "this function here i'll close this function.", 'start': 348.7, 'duration': 2.141}, {'end': 356.804, 'text': 'before this closing this function, you can write, you can print what printf %d, what you can print.', 'start': 350.841, 'duration': 5.963}, {'end': 360.106, 'text': 'see tail next.', 'start': 356.804, 'duration': 3.302}, {'end': 364.192, 'text': 'tail of next means This address.', 'start': 360.106, 'duration': 4.086}, {'end': 368.043, 'text': '600 means we have reached till this address and data.', 'start': 364.192, 'duration': 3.851}, {'end': 371.385, 'text': 'tail of next data is 7.', 'start': 369.704, 'duration': 1.681}, {'end': 376.688, 'text': 'so it should print 7, because this is now the you can say, the first node.', 'start': 371.385, 'duration': 5.303}, {'end': 378.629, 'text': 'so it should print 7 right.', 'start': 376.688, 'duration': 1.941}, {'end': 379.89, 'text': 'this is how you can check.', 'start': 378.629, 'duration': 1.261}, {'end': 384.332, 'text': 'now we will see how to insert data at the end of the list.', 'start': 379.89, 'duration': 4.442}, {'end': 391.176, 'text': 'so now, suppose we have created this node having data 10 right and address is 700.', 'start': 384.332, 'duration': 6.844}, {'end': 394.798, 'text': 'so this address, the 700 address, would be stored in new node pointer.', 'start': 391.176, 'duration': 3.622}], 'summary': 'Insert data at beginning and end of circular linked list, verify insertion by checking tail data.', 'duration': 58.104, 'max_score': 336.694, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ReGglEXEH08/pics/ReGglEXEH08336694.jpg'}, {'end': 484.389, 'src': 'embed', 'start': 458.244, 'weight': 3, 'content': [{'end': 464.727, 'text': 'so in tail pointer also, we are going to store what is the address of the last node, that is 700.', 'start': 458.244, 'duration': 6.483}, {'end': 466.027, 'text': 'three things you have to update.', 'start': 464.727, 'duration': 1.3}, {'end': 469.509, 'text': 'but you have to take care which pointer you need to update first.', 'start': 466.027, 'duration': 3.482}, {'end': 476.543, 'text': 'see, here i want to store address of the first node, right, this one 600.', 'start': 469.509, 'duration': 7.034}, {'end': 480.746, 'text': 'and there is only one way to get address of the first node.', 'start': 476.543, 'duration': 4.203}, {'end': 484.389, 'text': 'this because we are not maintaining any head pointer, right.', 'start': 480.746, 'duration': 3.643}], 'summary': 'Storing last and first node addresses, 700 and 600, respectively, without head pointer.', 'duration': 26.145, 'max_score': 458.244, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ReGglEXEH08/pics/ReGglEXEH08458244.jpg'}, {'end': 632.128, 'src': 'heatmap', 'start': 603.457, 'weight': 0.783, 'content': [{'end': 606.159, 'text': 'you can write printf, %d and this thing, tail.', 'start': 603.457, 'duration': 2.702}, {'end': 607.58, 'text': 'next data right.', 'start': 606.159, 'duration': 1.421}, {'end': 611.721, 'text': 'so tail next means 600.', 'start': 608.2, 'duration': 3.521}, {'end': 613.402, 'text': 'so data at 600 is 7.', 'start': 611.721, 'duration': 1.681}, {'end': 614.822, 'text': 'so 7 should be printed.', 'start': 613.402, 'duration': 1.42}, {'end': 617.703, 'text': 'so this is how you can insert at end position.', 'start': 614.822, 'duration': 2.881}, {'end': 621.384, 'text': 'now we will see how to insert at any specific position.', 'start': 617.703, 'duration': 3.681}, {'end': 626.686, 'text': 'so now i want to insert a this node, a newly created node at position.', 'start': 621.384, 'duration': 5.302}, {'end': 632.128, 'text': 'suppose 3 means 1, 2 and 3 here, after this, before this one right.', 'start': 626.686, 'duration': 5.442}], 'summary': 'Demonstrates inserting a node at the 600th position and discussing insertion at a specific position.', 'duration': 28.671, 'max_score': 603.457, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ReGglEXEH08/pics/ReGglEXEH08603457.jpg'}, {'end': 689.206, 'src': 'embed', 'start': 658.046, 'weight': 4, 'content': [{'end': 658.627, 'text': 'Position 3.', 'start': 658.046, 'duration': 0.581}, {'end': 659.769, 'text': 'Position 4.', 'start': 658.627, 'duration': 1.142}, {'end': 661.832, 'text': 'But no position is there that is 6.', 'start': 659.769, 'duration': 2.063}, {'end': 663.614, 'text': 'So that should print invalid position.', 'start': 661.832, 'duration': 1.782}, {'end': 668.308, 'text': 'fine. so you will check the length of the list.', 'start': 664.445, 'duration': 3.863}, {'end': 671.671, 'text': 'length of the list is 4, 1, 2, 3 and 4.', 'start': 668.308, 'duration': 3.363}, {'end': 678.417, 'text': 'so if position is less than 0 or greater than this 4, then it should print invalid position right now.', 'start': 671.671, 'duration': 6.746}, {'end': 682.02, 'text': "maybe you can say ma'am, if position is 5, then also i can insert here.", 'start': 678.417, 'duration': 3.603}, {'end': 684.061, 'text': 'it means we can call insert at end.', 'start': 682.02, 'duration': 2.041}, {'end': 686.703, 'text': 'so you can implement that concept also.', 'start': 684.061, 'duration': 2.642}, {'end': 689.206, 'text': "but here i'm considering what.", 'start': 686.703, 'duration': 2.503}], 'summary': 'The transcript discusses checking positions and implementing insertion at the end based on the length of the list.', 'duration': 31.16, 'max_score': 658.046, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ReGglEXEH08/pics/ReGglEXEH08658046.jpg'}, {'end': 721.549, 'src': 'embed', 'start': 700.193, 'weight': 5, 'content': [{'end': 709.018, 'text': 'we need a pointer that is new node and as well as we will ask from the user at which position he wants to insert right to store that position also we need another variable.', 'start': 700.193, 'duration': 8.825}, {'end': 715.787, 'text': 'you can say position right and suppose user has entered position is three means one, two and three.', 'start': 709.018, 'duration': 6.769}, {'end': 716.948, 'text': 'here i want to insert.', 'start': 715.787, 'duration': 1.161}, {'end': 719.449, 'text': 'so i have to reach till this position now.', 'start': 716.948, 'duration': 2.501}, {'end': 721.549, 'text': 'so you have to traverse this, this list.', 'start': 719.449, 'duration': 2.1}], 'summary': 'Insert a new node at user-specified position in a linked list.', 'duration': 21.356, 'max_score': 700.193, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ReGglEXEH08/pics/ReGglEXEH08700193.jpg'}], 'start': 64.887, 'title': 'Linked list insertion', 'summary': 'Discusses insertion in circular linked list, covering insertion at the beginning and end, node creation, memory allocation, pointer updating, and verification of correct insertion, as well as explaining the process of inserting nodes in a linked list and handling invalid insertion positions.', 'chapters': [{'end': 437.435, 'start': 64.887, 'title': 'Circular linked list: insertion at the beginning and end', 'summary': 'Discusses the process of inserting a node at the beginning and end of a circular linked list, including the creation of a new node, dynamic memory allocation using malloc, and updating the pointers for the first and last nodes. it also covers the verification of correct insertion by accessing and printing the data of the new nodes.', 'duration': 372.548, 'highlights': ['The process of inserting a node at the beginning involves creating a new node, allocating dynamic memory using malloc, and updating the pointers for the first and last nodes. The process includes creating a new node, allocating memory using malloc, and updating the pointers for the first and last nodes, ensuring correct insertion and linkage.', 'Verification of correct insertion is achieved by accessing and printing the data of the new nodes, providing a means to validate the insertion process. Validation of the insertion process is demonstrated by accessing and printing the data of the new nodes, ensuring the correctness of the insertion operation.', 'Inserting a node at the end involves similar steps of creating a new node and updating the pointers, with the key difference lying in the handling of the last node. The process of inserting a node at the end involves creating a new node, updating pointers, and handling the last node, distinguishing it from the insertion at the beginning.']}, {'end': 738.876, 'start': 437.435, 'title': 'Linked list insertion', 'summary': 'Explains the process of inserting nodes in a linked list, including updating node addresses and pointers, and handling invalid insertion positions, demonstrating an understanding of linked list operations.', 'duration': 301.441, 'highlights': ["You need to update the last node to contain the address of the first node (600), the last node's address is stored in the tail pointer (700) and updating the pointers must be done in a specific order to avoid losing access to node addresses. The last node should contain the address of the first node (600), the tail pointer should store the address of the last node (700), and updating the pointers must be done in a specific order to avoid losing access to node addresses.", "Handling invalid insertion positions by checking if the position is valid, based on the length of the list, and if it is not, printing 'invalid position'. Handling invalid insertion positions by checking if the position is valid based on the length of the list and printing 'invalid position' if it is not.", 'Traversing the list to reach the desired insertion position using a temporary pointer and creating a new node for insertion, as well as interacting with the user to obtain the insertion position. Traversing the list to reach the desired insertion position using a temporary pointer, creating a new node for insertion, and interacting with the user to obtain the insertion position.']}], 'duration': 673.989, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ReGglEXEH08/pics/ReGglEXEH0864887.jpg', 'highlights': ['Inserting a node at the beginning involves creating a new node, allocating dynamic memory using malloc, and updating the pointers for the first and last nodes.', 'Inserting a node at the end involves creating a new node, updating pointers, and handling the last node, distinguishing it from the insertion at the beginning.', 'Verification of correct insertion is achieved by accessing and printing the data of the new nodes, providing a means to validate the insertion process.', 'The last node should contain the address of the first node (600), the tail pointer should store the address of the last node (700), and updating the pointers must be done in a specific order to avoid losing access to node addresses.', "Handling invalid insertion positions by checking if the position is valid based on the length of the list and printing 'invalid position' if it is not.", 'Traversing the list to reach the desired insertion position using a temporary pointer, creating a new node for insertion, and interacting with the user to obtain the insertion position.']}, {'end': 1184.334, 'segs': [{'end': 804.021, 'src': 'embed', 'start': 774.929, 'weight': 3, 'content': [{'end': 785.239, 'text': 'that is in create at position only and we can suppose get length is a function that will return the length of this list and we are going to store that in variable l.', 'start': 774.929, 'duration': 10.31}, {'end': 798.913, 'text': 'so here i am going to declare one variable l also right and we also check now if our position is less than zero or position is greater than this.', 'start': 785.239, 'duration': 13.674}, {'end': 804.021, 'text': 'l it means here you can print invalid position in printf.', 'start': 798.913, 'duration': 5.108}], 'summary': 'Creating a list, storing its length in variable l, and checking for invalid position.', 'duration': 29.092, 'max_score': 774.929, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ReGglEXEH08/pics/ReGglEXEH08774929.jpg'}, {'end': 900.191, 'src': 'embed', 'start': 875.123, 'weight': 2, 'content': [{'end': 880.325, 'text': "we haven't allocated any memory to this, because if position is not valid, then no need to create this node.", 'start': 875.123, 'duration': 5.202}, {'end': 884.266, 'text': 'if position is one, then already that insert at beginning function would be called.', 'start': 880.325, 'duration': 3.941}, {'end': 888.528, 'text': 'now you can allocate the memory using malloc function right.', 'start': 884.266, 'duration': 4.262}, {'end': 895.21, 'text': 'so now this is how we have allocated the memory to this node dynamically allocated the memory using malloc function.', 'start': 888.528, 'duration': 6.682}, {'end': 897.711, 'text': 'right new node is a pointer pointing to this node.', 'start': 895.21, 'duration': 2.501}, {'end': 900.191, 'text': 'we have asked the for the data from the user.', 'start': 897.711, 'duration': 2.48}], 'summary': 'Dynamic memory allocated using malloc for new node.', 'duration': 25.068, 'max_score': 875.123, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ReGglEXEH08/pics/ReGglEXEH08875123.jpg'}, {'end': 1109.033, 'src': 'embed', 'start': 1081.136, 'weight': 0, 'content': [{'end': 1084.039, 'text': 'so first of all, before updating this, set the right link first.', 'start': 1081.136, 'duration': 2.903}, {'end': 1085.461, 'text': 'so update this thing.', 'start': 1084.039, 'duration': 1.422}, {'end': 1088.584, 'text': 'so how you can update that link.', 'start': 1085.461, 'duration': 3.123}, {'end': 1090.164, 'text': 'that is new node.', 'start': 1088.584, 'duration': 1.58}, {'end': 1091.545, 'text': 'next, see new node.', 'start': 1090.164, 'duration': 1.381}, {'end': 1093.366, 'text': 'next means this this part.', 'start': 1091.545, 'duration': 1.821}, {'end': 1098.768, 'text': "i'm accessing this part here i want to store 150, 150, address of next node from where i can get 150.", 'start': 1093.366, 'duration': 5.402}, {'end': 1099.609, 'text': 'here i have 150.', 'start': 1098.768, 'duration': 0.841}, {'end': 1106.212, 'text': 'so how you can access this part using this temp, pointer, temp of next.', 'start': 1099.609, 'duration': 6.603}, {'end': 1109.033, 'text': 'right now here i have 150.', 'start': 1106.212, 'duration': 2.821}], 'summary': 'Updating a link to store 150 at the next node.', 'duration': 27.897, 'max_score': 1081.136, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ReGglEXEH08/pics/ReGglEXEH081081136.jpg'}, {'end': 1182.771, 'src': 'embed', 'start': 1154.119, 'weight': 1, 'content': [{'end': 1157.221, 'text': 'that two functions we have already discussed in the previous video.', 'start': 1154.119, 'duration': 3.102}, {'end': 1161.184, 'text': 'right. so this is how you can insert in a circular link list.', 'start': 1157.221, 'duration': 3.963}, {'end': 1170.973, 'text': 'and if you maintain both head pointer and tail pointer then i guess it is very easy to insert any data in the circular linked list and start at beginning,', 'start': 1161.184, 'duration': 9.789}, {'end': 1173.557, 'text': 'also at end and at any position fine.', 'start': 1170.973, 'duration': 2.584}, {'end': 1176.201, 'text': 'so i guess no need to explain that code.', 'start': 1173.557, 'duration': 2.644}, {'end': 1182.771, 'text': "fine. so now i'll see in the next video, in next video we'll see how to delete data from a circular linked list.", 'start': 1176.201, 'duration': 6.57}], 'summary': 'Insert and delete functions discussed for circular linked list.', 'duration': 28.652, 'max_score': 1154.119, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ReGglEXEH08/pics/ReGglEXEH081154119.jpg'}], 'start': 738.876, 'title': 'Linked list insertion and circular linked list', 'summary': 'Covers inserting a node at a specific position in a linked list, including user input, length calculation, and traversal. it also discusses inserting data into a circular linked list, emphasizing link and pointer updates and demonstrating ease of insertion using head and tail pointers.', 'chapters': [{'end': 1020.343, 'start': 738.876, 'title': 'Linked list insertion', 'summary': 'Covers the process of inserting a node at a specific position in a linked list, including the use of printf and scanf for user input, the calculation of the length of the list, and the traversal of the list to reach the insertion position.', 'duration': 281.467, 'highlights': ['The process involves asking the user for the position using printf and scanf, calculating the length of the list using a dedicated function, and checking the validity of the insertion position, with emphasis on position 3 and the use of variable l to store the length of the list. Use of printf and scanf, calculation of list length, emphasis on position 3', 'The chapter explains the process of traversing the linked list to reach the insertion position, demonstrating the use of a while loop and a temporary pointer to iterate through the list, with a specific example of reaching position 3 in the list. Demonstration of traversing the list using a while loop and a temporary pointer to reach position 3', 'The explanation includes the concept of creating a new node for insertion, allocating memory using malloc function, and obtaining user input for the data to be inserted into the new node, highlighting the dynamic memory allocation process. Creation of new node, memory allocation using malloc function, user input for new node data']}, {'end': 1184.334, 'start': 1020.343, 'title': 'Inserting in circular linked list', 'summary': "Discusses inserting data into a circular linked list, emphasizing the process of updating links and pointers to maintain the list's integrity and demonstrating the ease of insertion using head and tail pointers.", 'duration': 163.991, 'highlights': ['The chapter emphasizes the importance of updating links and pointers to maintain the integrity of the circular linked list. The transcript repeatedly stresses the significance of updating links and pointers to establish connections and ensure the proper insertion of data, demonstrating the complexity and precision required in the process.', 'The ease of inserting data in a circular linked list is showcased, especially when maintaining both head and tail pointers. The discussion highlights the convenience and efficiency of inserting data at the beginning, end, or any position in a circular linked list when head and tail pointers are managed, indicating the simplicity of the insertion process.']}], 'duration': 445.458, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ReGglEXEH08/pics/ReGglEXEH08738876.jpg', 'highlights': ['The chapter emphasizes the importance of updating links and pointers to maintain the integrity of the circular linked list.', 'The ease of inserting data in a circular linked list is showcased, especially when maintaining both head and tail pointers.', 'The explanation includes the concept of creating a new node for insertion, allocating memory using malloc function, and obtaining user input for the data to be inserted into the new node, highlighting the dynamic memory allocation process.', 'The process involves asking the user for the position using printf and scanf, calculating the length of the list using a dedicated function, and checking the validity of the insertion position, with emphasis on position 3 and the use of variable l to store the length of the list.']}], 'highlights': ['The video covers insertion at the beginning, end, and any specific position in a circular linked list.', 'The last node should contain the address of the first node (600), the tail pointer should store the address of the last node (700), and updating the pointers must be done in a specific order to avoid losing access to node addresses.', 'Inserting a node at the beginning involves creating a new node, allocating dynamic memory using malloc, and updating the pointers for the first and last nodes.', 'Inserting a node at the end involves creating a new node, updating pointers, and handling the last node, distinguishing it from the insertion at the beginning.', 'The explanation includes the concept of creating a new node for insertion, allocating memory using malloc function, and obtaining user input for the data to be inserted into the new node, highlighting the dynamic memory allocation process.']}