title
2.5 Insertion of a Node in Linked List(at Beginning,End,Specified Position)with Code | DSA Tutorials

description
In this video we will see how to Insert a node in linked list - at beginning, at end and at any given position with example. we will also write a C program for insertion operation. 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/ #datastructurenotes #whatislinkedlist #insertioninlinkedlist #algorithms #dsa

detail
{'title': '2.5 Insertion of a Node in Linked List(at Beginning,End,Specified Position)with Code | DSA Tutorials', 'heatmap': [{'end': 588.115, 'start': 551.357, 'weight': 0.764}, {'end': 1043.138, 'start': 991.553, 'weight': 0.804}], 'summary': 'The tutorial covers topics including inserting a node after a given position, linked list basics, methods for inserting data, insertion and traversal, and linked list operations, emphasizing pointers and memory allocation.', 'chapters': [{'end': 48.759, 'segs': [{'end': 48.759, 'src': 'embed', 'start': 0.049, 'weight': 0, 'content': [{'end': 4.553, 'text': 'basically I will discuss here insert a node after a given position.', 'start': 0.049, 'duration': 4.504}, {'end': 10.619, 'text': 'suppose if you give position 2 it means this is first node first and 2.', 'start': 4.553, 'duration': 6.066}, {'end': 11.861, 'text': 'this is position second.', 'start': 10.619, 'duration': 1.242}, {'end': 15.524, 'text': 'so after this position here we are going to insert a node.', 'start': 11.861, 'duration': 3.663}, {'end': 22.712, 'text': 'or another case may be insert a node before a given location or position fine,', 'start': 16.625, 'duration': 6.087}, {'end': 30.121, 'text': 'and if you are not dealing with this location then you can say another case may be insert a node after a given value.', 'start': 22.712, 'duration': 7.409}, {'end': 31.702, 'text': 'suppose the value is 1.', 'start': 30.121, 'duration': 1.581}, {'end': 33.444, 'text': 'so after this node i want to insert.', 'start': 31.702, 'duration': 1.742}, {'end': 37.729, 'text': 'or second case may be after before this one i want to.', 'start': 34.125, 'duration': 3.604}, {'end': 39.891, 'text': 'i want to insert a node fine.', 'start': 37.729, 'duration': 2.162}, {'end': 48.759, 'text': 'so i guess if you get this point, insert after a given position, you can easily modify according to you for the remaining cases.', 'start': 39.891, 'duration': 8.868}], 'summary': 'Insert a node after or before a given position or value in a linked list.', 'duration': 48.71, 'max_score': 0.049, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dq3F3e9o2DM/pics/dq3F3e9o2DM49.jpg'}], 'start': 0.049, 'title': 'Inserting node at given position', 'summary': 'Discusses inserting a node after a given position in a linked list, demonstrating the process using examples of inserting a node before and after a given location or value.', 'chapters': [{'end': 48.759, 'start': 0.049, 'title': 'Inserting node at given position', 'summary': 'Discusses inserting a node after a given position in a linked list, demonstrating the process using examples of inserting a node before and after a given location or value.', 'duration': 48.71, 'highlights': ['The process of inserting a node after a given position in a linked list is explained, with examples of inserting a node before and after a given location or value.', 'Demonstrating inserting a node at a specific position, such as after the second position, and modifying for other cases is emphasized.', 'The concept of inserting a node after a given value, such as after the node with value 1, is highlighted as an alternative case.']}], 'duration': 48.71, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dq3F3e9o2DM/pics/dq3F3e9o2DM49.jpg', 'highlights': ['The process of inserting a node after a given position in a linked list is explained, with examples of inserting a node before and after a given location or value.', 'Demonstrating inserting a node at a specific position, such as after the second position, and modifying for other cases is emphasized.', 'The concept of inserting a node after a given value, such as after the node with value 1, is highlighted as an alternative case.']}, {'end': 541.545, 'segs': [{'end': 121.519, 'src': 'embed', 'start': 92.592, 'weight': 0, 'content': [{'end': 94.052, 'text': 'you can check out that video.', 'start': 92.592, 'duration': 1.46}, {'end': 95.573, 'text': "fine, so we'll discuss here.", 'start': 94.052, 'duration': 1.521}, {'end': 98.794, 'text': 'the first case insertion at beginning.', 'start': 95.573, 'duration': 3.221}, {'end': 104.195, 'text': 'so now it means here you want to insert a node.', 'start': 98.794, 'duration': 5.401}, {'end': 106.853, 'text': 'fine, this is first node.', 'start': 104.195, 'duration': 2.658}, {'end': 111.375, 'text': 'so before this node at the beginning of the list, you are going to insert this node.', 'start': 106.853, 'duration': 4.522}, {'end': 118.798, 'text': 'so first of all, obviously you are going to create a node and you will ask the user which value you want to insert fine.', 'start': 111.375, 'duration': 7.423}, {'end': 121.519, 'text': 'see this here value is 7, here 1, here 9.', 'start': 118.798, 'duration': 2.721}], 'summary': 'Discussion on inserting a node at the beginning of a list.', 'duration': 28.927, 'max_score': 92.592, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dq3F3e9o2DM/pics/dq3F3e9o2DM92592.jpg'}, {'end': 204.594, 'src': 'embed', 'start': 181.706, 'weight': 1, 'content': [{'end': 189.029, 'text': 'why we are taking this new node we have already discussed fine, now we have to create a node, this node, newly created node.', 'start': 181.706, 'duration': 7.323}, {'end': 193.63, 'text': 'fine. so how you will create how to allocate memory dynamically using malloc function.', 'start': 189.029, 'duration': 4.601}, {'end': 202.913, 'text': 'so the syntax says you will write malloc and here what you will write, the size of keyword, and here you will write the data type.', 'start': 193.63, 'duration': 9.283}, {'end': 204.594, 'text': 'data type is what struct node.', 'start': 202.913, 'duration': 1.681}], 'summary': 'Creating a new node in c using malloc function for dynamic memory allocation.', 'duration': 22.888, 'max_score': 181.706, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dq3F3e9o2DM/pics/dq3F3e9o2DM181706.jpg'}], 'start': 48.759, 'title': 'Linked list basics', 'summary': 'Covers the fundamentals of linked lists, including creating a new node, allocating memory, and inserting nodes at the beginning of the list, utilizing pointers and addresses.', 'chapters': [{'end': 138.153, 'start': 48.759, 'title': 'Linked list insertion operations', 'summary': 'Covers the insertion operation in a linked list, specifically focusing on insertion at the beginning, with examples and code explanation.', 'duration': 89.394, 'highlights': ["The chapter focuses on insertion operation in a linked list, specifically insertion at the beginning, with examples and code explanation. This sets the context for the chapter's main focus on insertion operation, particularly at the beginning of the linked list.", 'The video assumes the creation of a linked list with three nodes and demonstrates insertion operation without creating the linked list from scratch. The video assumes the existence of a linked list with three nodes and demonstrates insertion operations without creating the linked list.', 'The process of creating a new node and dynamic memory allocation using malloc function in C language is briefly explained. The chapter briefly explains the process of creating a new node using dynamic memory allocation and the malloc function in C language.']}, {'end': 541.545, 'start': 138.153, 'title': 'Linked list basics', 'summary': 'Covers the fundamentals of linked lists, including creating a new node, allocating memory, and inserting nodes at the beginning of the list, utilizing pointers and addresses.', 'duration': 403.392, 'highlights': ['Creating a new node and allocating memory using malloc function Explains the process of creating a new node, allocating memory using malloc function, and storing the address of the newly allocated block. It mentions the allocation of eight bytes in a 32-bit compiler and the need for typecasting.', 'Inserting a node at the beginning of the list Describes the process of inserting a node at the beginning of the list, updating the head pointer, and accessing the next pointer to store the address of the new node. It emphasizes the importance of updating the head pointer before the next pointer.', 'Accessing and updating the head pointer Explains the process of accessing and updating the head pointer to store the address of the newly created node, emphasizing the need to update the head pointer with the address of the new node.']}], 'duration': 492.786, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dq3F3e9o2DM/pics/dq3F3e9o2DM48759.jpg', 'highlights': ['The chapter focuses on insertion operation in a linked list, specifically insertion at the beginning, with examples and code explanation.', 'Creating a new node and allocating memory using malloc function Explains the process of creating a new node, allocating memory using malloc function, and storing the address of the newly allocated block.', 'Inserting a node at the beginning of the list Describes the process of inserting a node at the beginning of the list, updating the head pointer, and accessing the next pointer to store the address of the new node.']}, {'end': 814.915, 'segs': [{'end': 588.115, 'src': 'heatmap', 'start': 551.357, 'weight': 0.764, 'content': [{'end': 554.04, 'text': 'So simply directly in main function you can write this coding.', 'start': 551.357, 'duration': 2.683}, {'end': 556.223, 'text': 'fine. and after this,', 'start': 554.821, 'duration': 1.402}, {'end': 567.515, 'text': 'if you want to display the list that whatever the code for display is we have already discussed in the previous video you simply write down that code and now the newly created list will be display,', 'start': 556.223, 'duration': 11.292}, {'end': 570.338, 'text': 'displayed. that is two, seven, one and nine.', 'start': 567.515, 'duration': 2.823}, {'end': 572.901, 'text': 'so this is how we are going to insert at beginning.', 'start': 570.338, 'duration': 2.563}, {'end': 575.764, 'text': 'now. second case is how to insert at end.', 'start': 572.901, 'duration': 2.863}, {'end': 578.372, 'text': 'so now, see, this is our list.', 'start': 576.912, 'duration': 1.46}, {'end': 581.073, 'text': 'suppose three nodes are there at the end.', 'start': 578.372, 'duration': 2.701}, {'end': 585.114, 'text': 'here i want to insert a newly created node.', 'start': 581.073, 'duration': 4.041}, {'end': 588.115, 'text': 'at the end this coding would be same.', 'start': 585.114, 'duration': 3.001}], 'summary': 'The transcript provides instructions for inserting nodes at the beginning and end of a list, with an example of the newly created list being displayed as 2, 7, 1, and 9.', 'duration': 36.758, 'max_score': 551.357, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dq3F3e9o2DM/pics/dq3F3e9o2DM551357.jpg'}, {'end': 650.025, 'src': 'embed', 'start': 623.408, 'weight': 2, 'content': [{'end': 632.48, 'text': 'now the data you want to insert it, it is going to store in this data part at address of new node and data part.', 'start': 623.408, 'duration': 9.072}, {'end': 635.061, 'text': 'this is how we are going to access this data.', 'start': 632.48, 'duration': 2.581}, {'end': 636.621, 'text': 'so suppose i want to insert here 5.', 'start': 635.061, 'duration': 1.56}, {'end': 640.623, 'text': 'right, so this is the.', 'start': 636.621, 'duration': 4.002}, {'end': 644.824, 'text': 'this would be the last node because we are going to insert at the end.', 'start': 640.623, 'duration': 4.201}, {'end': 650.025, 'text': 'so in this next part, in this next part here, we are going to store 0, or you can say null.', 'start': 644.824, 'duration': 5.201}], 'summary': 'Inserting data into a linked list at the end, with an example of inserting 5 as the last node.', 'duration': 26.617, 'max_score': 623.408, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dq3F3e9o2DM/pics/dq3F3e9o2DM623408.jpg'}, {'end': 755.671, 'src': 'embed', 'start': 725.785, 'weight': 0, 'content': [{'end': 736.93, 'text': 'so now here we will take a pointer variable that is temp, and first of all we will assign this temp here head.', 'start': 725.785, 'duration': 11.145}, {'end': 739.871, 'text': 'so temp is equal to head.', 'start': 736.93, 'duration': 2.941}, {'end': 747.194, 'text': 'it means now, here we have another pointer variable that is temp, and in head head we have 100.', 'start': 739.871, 'duration': 7.323}, {'end': 749.555, 'text': 'so temp is also going to contain 100.', 'start': 747.194, 'duration': 2.361}, {'end': 751.796, 'text': 'so now temp is also pointing the first node.', 'start': 749.555, 'duration': 2.241}, {'end': 755.671, 'text': 'Now you can traverse this using this temp.', 'start': 753.129, 'duration': 2.542}], 'summary': 'Using temp pointer, assign it to head (100) to traverse the first node.', 'duration': 29.886, 'max_score': 725.785, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dq3F3e9o2DM/pics/dq3F3e9o2DM725785.jpg'}], 'start': 541.805, 'title': 'Inserting data into lists', 'summary': 'Discusses methods for inserting data, including inserting at the beginning and end of a list, with an example and a specified value after insertion. it also explains the process of inserting a newly created node at the end of a linked list, involving memory allocation, traversal, and utilization of a while loop.', 'chapters': [{'end': 578.372, 'start': 541.805, 'title': 'Inserting data into a list', 'summary': 'Discusses two methods for inserting data into a list: inserting at the beginning and inserting at the end. it includes an example of inserting at the beginning and mentions the values to be displayed after insertion: 2719.', 'duration': 36.567, 'highlights': ['The chapter discusses two methods for inserting data into a list: inserting at the beginning and inserting at the end.', 'An example of inserting at the beginning is provided, along with the values to be displayed after insertion: 2719.']}, {'end': 814.915, 'start': 578.372, 'title': 'Inserting a newly created node at the end of a linked list', 'summary': 'Explains the process of inserting a newly created node at the end of a linked list, involving the allocation of memory, traversal of the list using a temporary pointer, and the utilization of a while loop to locate the last node and insert the new node.', 'duration': 236.543, 'highlights': ['The chapter explains the process of inserting a newly created node at the end of a linked list. Provides the main topic of the chapter.', 'The chapter emphasizes the allocation of memory for the newly created node and the process of dynamically obtaining data from the user to be inserted into the linked list. Emphasizes the dynamic allocation of memory and user input for data insertion.', 'The chapter demonstrates the traversal of the list using a temporary pointer to locate the last node in the linked list. Highlights the traversal process using a temporary pointer to locate the last node.', 'The chapter presents the utilization of a while loop to traverse the list and locate the last node to insert the new node. Explains the use of a while loop to locate the last node for inserting the new node.']}], 'duration': 273.11, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dq3F3e9o2DM/pics/dq3F3e9o2DM541805.jpg', 'highlights': ['The chapter discusses two methods for inserting data into a list: inserting at the beginning and inserting at the end.', 'The chapter explains the process of inserting a newly created node at the end of a linked list. Provides the main topic of the chapter.', 'The chapter demonstrates the traversal of the list using a temporary pointer to locate the last node in the linked list. Highlights the traversal process using a temporary pointer to locate the last node.', 'The chapter presents the utilization of a while loop to traverse the list and locate the last node to insert the new node. Explains the use of a while loop to locate the last node for inserting the new node.', 'An example of inserting at the beginning is provided, along with the values to be displayed after insertion: 2719.']}, {'end': 1389.436, 'segs': [{'end': 1043.138, 'src': 'heatmap', 'start': 991.553, 'weight': 0.804, 'content': [{'end': 995.375, 'text': 'fine, now we are going to execute this thing.', 'start': 991.553, 'duration': 3.822}, {'end': 999.217, 'text': 'temp next, but temp is containing now zero.', 'start': 995.375, 'duration': 3.842}, {'end': 1001.078, 'text': 'so what is temp next?', 'start': 999.217, 'duration': 1.861}, {'end': 1005.66, 'text': 'there is no temp next, because temp is what zero.', 'start': 1001.078, 'duration': 4.582}, {'end': 1008.682, 'text': 'so zero is not the address of any node.', 'start': 1005.66, 'duration': 3.022}, {'end': 1010.223, 'text': 'so which node you will access?', 'start': 1008.682, 'duration': 1.541}, {'end': 1012.044, 'text': 'so that is why you are not going to write this thing.', 'start': 1010.223, 'duration': 1.821}, {'end': 1014.646, 'text': 'if you write this thing, then this node is not going to be inserted.', 'start': 1012.044, 'duration': 2.602}, {'end': 1018.869, 'text': 'you will write this thing temp next not equal to null, fine.', 'start': 1014.646, 'duration': 4.223}, {'end': 1023.532, 'text': 'so now, third thing is how to insert after a given location.', 'start': 1018.869, 'duration': 4.663}, {'end': 1025.574, 'text': 'so in this case also, this coding would be same.', 'start': 1023.532, 'duration': 2.042}, {'end': 1027.595, 'text': 'we have created a new node.', 'start': 1025.574, 'duration': 2.021}, {'end': 1031.577, 'text': 'fine address would be allocated to this new node pointer right now.', 'start': 1027.595, 'duration': 3.982}, {'end': 1037.578, 'text': 'see, you will ask from the user after the position after which you want to insert.', 'start': 1031.577, 'duration': 6.001}, {'end': 1040.358, 'text': 'so this is how we are going to take input from the user.', 'start': 1037.578, 'duration': 2.78}, {'end': 1043.138, 'text': 'enter the position and address of in this variable.', 'start': 1040.358, 'duration': 2.78}], 'summary': 'Explanation of inserting nodes, addressing, and user input for node insertion.', 'duration': 51.585, 'max_score': 991.553, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dq3F3e9o2DM/pics/dq3F3e9o2DM991553.jpg'}, {'end': 1097.25, 'src': 'embed', 'start': 1045.2, 'weight': 1, 'content': [{'end': 1049.261, 'text': 'so for this you have to declare this variable first of all, fine.', 'start': 1045.2, 'duration': 4.061}, {'end': 1053.021, 'text': 'so here, somewhere before this, you can declare this variable.', 'start': 1049.261, 'duration': 3.76}, {'end': 1056.082, 'text': 'suppose i am declaring it here int pos.', 'start': 1053.021, 'duration': 3.061}, {'end': 1060.347, 'text': 'so now see, here we have length of linked list.', 'start': 1057.506, 'duration': 2.841}, {'end': 1063.688, 'text': 'is what what you can say count is what one, two and three.', 'start': 1060.347, 'duration': 3.341}, {'end': 1070.95, 'text': 'and if i, the user, enter the position five, then it should return error message that invalid position right.', 'start': 1063.688, 'duration': 7.262}, {'end': 1072.771, 'text': 'so how to count these values?', 'start': 1070.95, 'duration': 1.821}, {'end': 1075.852, 'text': 'that also, we have already discussed in the previous video.', 'start': 1072.771, 'duration': 3.081}, {'end': 1080.413, 'text': 'that is why i am again and again saying please watch out that video first of all, fine.', 'start': 1075.852, 'duration': 4.561}, {'end': 1089.444, 'text': 'so here you can check if this position is greater than your count.', 'start': 1080.413, 'duration': 9.031}, {'end': 1092.386, 'text': 'or you can say length of that link list.', 'start': 1089.444, 'duration': 2.942}, {'end': 1097.25, 'text': 'if you find out the length, you can use that function also fine.', 'start': 1092.386, 'duration': 4.864}], 'summary': 'Explaining variable declaration, position counting, and error handling in linked list operations.', 'duration': 52.05, 'max_score': 1045.2, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dq3F3e9o2DM/pics/dq3F3e9o2DM1045200.jpg'}, {'end': 1185.709, 'src': 'embed', 'start': 1154.331, 'weight': 0, 'content': [{'end': 1154.952, 'text': 'obviously we are.', 'start': 1154.331, 'duration': 0.621}, {'end': 1158.094, 'text': 'we are taking another pointer variable, that is, temp.', 'start': 1154.952, 'duration': 3.142}, {'end': 1160.235, 'text': 'temp is equal to head.', 'start': 1158.094, 'duration': 2.141}, {'end': 1168.981, 'text': 'this temp is also pointing this one right, because for traversing the list, you must have to take one another pointer variable,', 'start': 1160.235, 'duration': 8.746}, {'end': 1175.905, 'text': 'because we cannot move this head and this pointer variable is going to store address of the newly created node.', 'start': 1168.981, 'duration': 6.924}, {'end': 1179.446, 'text': 'so to traverse the list, you need one third pointer.', 'start': 1175.905, 'duration': 3.541}, {'end': 1183.608, 'text': 'fine. so now, first of all, temp is pointing here.', 'start': 1179.446, 'duration': 4.162}, {'end': 1185.709, 'text': 'now, what you will do?', 'start': 1183.608, 'duration': 2.101}], 'summary': 'Explanation of using a pointer variable for list traversal.', 'duration': 31.378, 'max_score': 1154.331, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dq3F3e9o2DM/pics/dq3F3e9o2DM1154331.jpg'}, {'end': 1234.432, 'src': 'embed', 'start': 1206.023, 'weight': 2, 'content': [{'end': 1208.824, 'text': 'so now control will go within this loop.', 'start': 1206.023, 'duration': 2.801}, {'end': 1210.125, 'text': 'now, temp is equal to temp.', 'start': 1208.824, 'duration': 1.301}, {'end': 1211.805, 'text': 'next, what is value of temp.', 'start': 1210.125, 'duration': 1.68}, {'end': 1213.646, 'text': 'next, see temp.', 'start': 1211.805, 'duration': 1.841}, {'end': 1214.407, 'text': 'next is what 200 right.', 'start': 1213.646, 'duration': 0.761}, {'end': 1219.256, 'text': 'so 200 will be stored in temp.', 'start': 1214.407, 'duration': 4.849}, {'end': 1221.018, 'text': 'now. now temp is going to contain 200.', 'start': 1219.256, 'duration': 1.762}, {'end': 1227.405, 'text': 'so now temp is going to point here right and i++.', 'start': 1221.018, 'duration': 6.387}, {'end': 1228.806, 'text': 'now i becomes 2.', 'start': 1227.405, 'duration': 1.401}, {'end': 1231.329, 'text': 'now i becomes 2.', 'start': 1228.806, 'duration': 2.523}, {'end': 1233.151, 'text': 'now again, check 2 less than position.', 'start': 1231.329, 'duration': 1.822}, {'end': 1234.432, 'text': 'position is 2.', 'start': 1233.151, 'duration': 1.281}], 'summary': 'Loop iteration results in temp containing 200 and i becoming 2.', 'duration': 28.409, 'max_score': 1206.023, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dq3F3e9o2DM/pics/dq3F3e9o2DM1206023.jpg'}], 'start': 814.915, 'title': 'Linked list insertion and traversal', 'summary': 'Discusses the process of inserting nodes at the end and after a given position in a linked list, emphasizing the necessity of traversing the list and involving the insertion of 400 at the end.', 'chapters': [{'end': 920.179, 'start': 814.915, 'title': 'Linked list insertion', 'summary': 'Discusses the process of inserting a node at the end of a linked list, involving traversing the list, updating pointers, and storing new values, with a final insertion of 400 at the end.', 'duration': 105.264, 'highlights': ["The process involves traversing the list using a while loop and updating the 'temp' pointer to move to the next node, such as from 200 to 300.", "The pointer manipulation is crucial in accessing and updating the linked list nodes, as demonstrated by the use of 'temp' and 'temp next' to access and modify node values.", 'The final step involves updating the link to store the new value, as shown by the insertion of 400 at the end, completing the insertion process.']}, {'end': 1389.436, 'start': 920.179, 'title': 'Insertion and traversal in linked list', 'summary': 'Discusses the insertion and traversal in linked lists, demonstrating the process of inserting nodes at the end and after a given position, and emphasizing the necessity of traversing the list to reach the specified position before insertion.', 'duration': 469.257, 'highlights': ['The chapter discusses the process of inserting nodes at the end and after a given position in a linked list. The chapter explains the process of inserting nodes at the end and after a given position in a linked list, providing a comprehensive understanding of the insertion process.', 'Emphasizes the necessity of traversing the list to reach the specified position before insertion. The importance of traversing the list to reach the specified position before insertion is highlighted, emphasizing the need to traverse the list to ensure accurate node insertion.', 'Demonstrates the use of a while loop to traverse the list and reach the specified position for node insertion. The demonstration of using a while loop to traverse the list and reach the specified position for node insertion is explained, providing a clear understanding of the traversal process.']}], 'duration': 574.521, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dq3F3e9o2DM/pics/dq3F3e9o2DM814915.jpg', 'highlights': ['The final step involves updating the link to store the new value, as shown by the insertion of 400 at the end, completing the insertion process.', "The process involves traversing the list using a while loop and updating the 'temp' pointer to move to the next node, such as from 200 to 300.", "The pointer manipulation is crucial in accessing and updating the linked list nodes, as demonstrated by the use of 'temp' and 'temp next' to access and modify node values.", 'Emphasizes the necessity of traversing the list to reach the specified position before insertion. The importance of traversing the list to reach the specified position before insertion is highlighted, emphasizing the need to traverse the list to ensure accurate node insertion.', 'Demonstrates the use of a while loop to traverse the list and reach the specified position for node insertion. The demonstration of using a while loop to traverse the list and reach the specified position for node insertion is explained, providing a clear understanding of the traversal process.', 'The chapter discusses the process of inserting nodes at the end and after a given position in a linked list. The chapter explains the process of inserting nodes at the end and after a given position in a linked list, providing a comprehensive understanding of the insertion process.']}, {'end': 1626.637, 'segs': [{'end': 1416.528, 'src': 'embed', 'start': 1389.436, 'weight': 2, 'content': [{'end': 1395.1, 'text': 'so here you will update, rather than this 300, you will write, you will update here 400.', 'start': 1389.436, 'duration': 5.664}, {'end': 1398.603, 'text': 'fine, you will write down.', 'start': 1395.1, 'duration': 3.503}, {'end': 1399.704, 'text': 'you will write down.', 'start': 1398.603, 'duration': 1.101}, {'end': 1402.406, 'text': 'temp next is equal to new node.', 'start': 1399.704, 'duration': 2.702}, {'end': 1406.088, 'text': 'now this node is going to point here.', 'start': 1402.406, 'duration': 3.682}, {'end': 1408.03, 'text': 'now there is no link like this.', 'start': 1406.088, 'duration': 1.942}, {'end': 1410.202, 'text': 'Now, what is the problem??', 'start': 1409.301, 'duration': 0.901}, {'end': 1411.523, 'text': 'This node is now.', 'start': 1410.642, 'duration': 0.881}, {'end': 1413.686, 'text': 'you have lost the link to this node.', 'start': 1411.523, 'duration': 2.163}, {'end': 1414.807, 'text': 'Now this is free node.', 'start': 1413.726, 'duration': 1.081}, {'end': 1416.528, 'text': 'This is not the list.', 'start': 1415.628, 'duration': 0.9}], 'summary': 'Updating from 300 to 400 causes loss of link and free node.', 'duration': 27.092, 'max_score': 1389.436, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dq3F3e9o2DM/pics/dq3F3e9o2DM1389436.jpg'}, {'end': 1536.633, 'src': 'embed', 'start': 1443.433, 'weight': 0, 'content': [{'end': 1450.377, 'text': 'now how you will, how you will store this 300 here, from where you will get this 300 right.', 'start': 1443.433, 'duration': 6.944}, {'end': 1453.139, 'text': 'see, now this 300 is stored here.', 'start': 1450.377, 'duration': 2.762}, {'end': 1462.347, 'text': 'how you you can access this value using pointer right, because this node, the pointer to this node is temp.', 'start': 1453.139, 'duration': 9.208}, {'end': 1464.608, 'text': 'temp is going to point here.', 'start': 1462.347, 'duration': 2.261}, {'end': 1469.112, 'text': 'using temp node you can access both the members of this node right.', 'start': 1464.608, 'duration': 4.504}, {'end': 1472.515, 'text': 'so how you can access temp next.', 'start': 1469.112, 'duration': 3.403}, {'end': 1474.777, 'text': 'now temp next means value 300.', 'start': 1472.515, 'duration': 2.262}, {'end': 1477.319, 'text': 'now 300 you are going to store here.', 'start': 1474.777, 'duration': 2.542}, {'end': 1484.93, 'text': 'so here what you can write temp next, temp of next means 300.', 'start': 1477.319, 'duration': 7.611}, {'end': 1488.853, 'text': 'so 300 you are going to store where here.', 'start': 1484.93, 'duration': 3.923}, {'end': 1494.238, 'text': 'fine, how you will access this part of this node.', 'start': 1488.853, 'duration': 5.385}, {'end': 1496.72, 'text': 'that pointer to this node is new node.', 'start': 1494.238, 'duration': 2.482}, {'end': 1498.481, 'text': 'using new node you can access.', 'start': 1496.72, 'duration': 1.761}, {'end': 1511.254, 'text': 'so here you will write new node and this part is what next next new node next is equal to temp next.', 'start': 1498.481, 'duration': 12.773}, {'end': 1517.157, 'text': 'this is how we are going to establish this link now we are going to establish this link.', 'start': 1511.254, 'duration': 5.903}, {'end': 1521.12, 'text': 'fine, now this node is going to store address of next node.', 'start': 1517.157, 'duration': 3.963}, {'end': 1522.781, 'text': 'address of next node is 400.', 'start': 1521.12, 'duration': 1.661}, {'end': 1524.262, 'text': 'so you have to update this value.', 'start': 1522.781, 'duration': 1.481}, {'end': 1526.643, 'text': 'so here you will store 400.', 'start': 1524.262, 'duration': 2.381}, {'end': 1532.332, 'text': 'now this link is going to be destroyed and this node is point pointing here.', 'start': 1526.643, 'duration': 5.689}, {'end': 1536.633, 'text': 'now, right, so how you will update this value, this 400 value?', 'start': 1532.332, 'duration': 4.301}], 'summary': 'Storing and accessing values using pointers in a linked list with specific examples.', 'duration': 93.2, 'max_score': 1443.433, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dq3F3e9o2DM/pics/dq3F3e9o2DM1443433.jpg'}, {'end': 1586.883, 'src': 'embed', 'start': 1562.772, 'weight': 1, 'content': [{'end': 1572.756, 'text': 'this is how we are going to insert a node after a given position and after this you can write around the node to display these members, these values,', 'start': 1562.772, 'duration': 9.984}, {'end': 1574.257, 'text': 'that is, 7, 1, then 5 and then 9.', 'start': 1572.756, 'duration': 1.501}, {'end': 1576.878, 'text': 'that we have already discussed.', 'start': 1574.257, 'duration': 2.621}, {'end': 1584.622, 'text': 'so if in one program you want to, you want to perform these three operations, then you can make three functions insert at beginning,', 'start': 1576.878, 'duration': 7.744}, {'end': 1586.883, 'text': 'insert at end and insert after position.', 'start': 1584.622, 'duration': 2.261}], 'summary': 'Explanation of inserting a node after a given position and discussing the values 7, 1, 5, and 9.', 'duration': 24.111, 'max_score': 1562.772, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dq3F3e9o2DM/pics/dq3F3e9o2DM1562772.jpg'}], 'start': 1389.436, 'title': 'Linked list operations', 'summary': 'Covers the process of establishing links and inserting nodes in a linked list, emphasizing the use of pointers, insertion after a given position, and global declaration of pointers, with a mention of the next topic on deleting a node.', 'chapters': [{'end': 1474.777, 'start': 1389.436, 'title': 'Linked list link establishment', 'summary': 'Discusses the process of establishing a link in a linked list, emphasizing the need to insert the right link first and the method of storing and accessing the value using pointers.', 'duration': 85.341, 'highlights': ['The process of establishing a link in a linked list requires inserting the right link first. It is emphasized that the correct link should be inserted first to ensure the proper establishment of the link.', 'Storing and accessing the value using pointers is demonstrated through the example of accessing the value 300 using the pointer temp. The method of accessing the value 300 using the pointer temp is explained, highlighting the role of pointers in accessing node members.']}, {'end': 1626.637, 'start': 1474.777, 'title': 'Inserting a node in a linked list', 'summary': 'Explains how to insert a node in a linked list, including establishing links, updating values, and the use of pointers, with a focus on inserting after a given position and displaying member values. it also mentions the implementation of insertion operations through functions and the declaration of pointers globally. the video concludes with a mention of the next topic on deleting a node from a linked list.', 'duration': 151.86, 'highlights': ['The chapter explains how to insert a node in a linked list, including establishing links, updating values, and the use of pointers. The explanation covers the process of inserting a node, establishing links, updating values, and using pointers.', 'Inserting after a given position and displaying member values are emphasized. The chapter highlights the insertion of a node after a given position and the display of member values.', 'Implementation of insertion operations through functions and the declaration of pointers globally are discussed. The video discusses the implementation of insertion operations through functions and the declaration of pointers globally.', 'Next topic on deleting a node from a linked list is mentioned. The video concludes with a mention of the next topic on deleting a node from a linked list.']}], 'duration': 237.201, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/dq3F3e9o2DM/pics/dq3F3e9o2DM1389436.jpg', 'highlights': ['The process of establishing a link in a linked list requires inserting the right link first.', 'Storing and accessing the value using pointers is demonstrated through the example of accessing the value 300 using the pointer temp.', 'Inserting after a given position and displaying member values are emphasized.', 'The chapter explains how to insert a node in a linked list, including establishing links, updating values, and the use of pointers.', 'Implementation of insertion operations through functions and the declaration of pointers globally are discussed.', 'Next topic on deleting a node from a linked list is mentioned.']}], 'highlights': ['The chapter discusses the process of inserting nodes at the end and after a given position in a linked list, providing a comprehensive understanding of the insertion process.', 'The chapter presents the utilization of a while loop to traverse the list and locate the last node to insert the new node. Explains the use of a while loop to locate the last node for inserting the new node.', 'The process of establishing a link in a linked list requires inserting the right link first.', "The process involves traversing the list using a while loop and updating the 'temp' pointer to move to the next node, such as from 200 to 300.", 'The chapter explains how to insert a node in a linked list, including establishing links, updating values, and the use of pointers.']}