title
2.4 Linked List Implementation in C/C++ | Creation and Display | DSA Tutorials

description
CORRECTION: @24:10 initialize choice variable with 1 by writing: int choice=1; In this video we will see implementation of basic operations like Create a Node in Linked List and traverse a Linked List. 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/ #linkedlist #datastructures #algorithms

detail
{'title': '2.4 Linked List Implementation in C/C++ | Creation and Display | DSA Tutorials', 'heatmap': [{'end': 333.891, 'start': 293.522, 'weight': 0.77}, {'end': 539.989, 'start': 381.538, 'weight': 0.717}, {'end': 664.441, 'start': 590.215, 'weight': 0.702}, {'end': 751.676, 'start': 725.787, 'weight': 0.745}, {'end': 1518.04, 'start': 1496.515, 'weight': 0.703}], 'summary': 'Learn the basics of singly linked lists and their implementation in c, covering logical view, node creation, memory allocation, pointer variable creation, dynamic memory allocation, linked list operations, node insertion, traversal, and pointer manipulation, all with practical examples and emphasis on key concepts such as dynamic memory allocation, pointers, and structures in c language.', 'chapters': [{'end': 43.51, 'segs': [{'end': 43.51, 'src': 'embed', 'start': 0.029, 'weight': 0, 'content': [{'end': 4.554, 'text': 'video is for this topic is you should know the basics of linked list what is linked list,', 'start': 0.029, 'duration': 4.525}, {'end': 8.458, 'text': 'how to represent a linked list or you should know the what is singly linked list.', 'start': 4.554, 'duration': 3.904}, {'end': 12.383, 'text': 'basically, when we say linked list, then we are talking about singly linked list.', 'start': 8.458, 'duration': 3.925}, {'end': 15.386, 'text': 'right. so we are going to implement singly linked list here.', 'start': 12.383, 'duration': 3.003}, {'end': 17.347, 'text': 'fine, plus.', 'start': 15.386, 'duration': 1.961}, {'end': 23.851, 'text': 'you should know what is dynamic memory allocation and how to use the malloc function in C language right as well,', 'start': 17.347, 'duration': 6.504}, {'end': 27.293, 'text': 'as you should have the knowledge of pointers plus structure.', 'start': 23.851, 'duration': 3.442}, {'end': 39.945, 'text': 'what is structure, data type in C language, how to access the structure members right, using that structure variable also, plus pointer also fine.', 'start': 27.293, 'duration': 12.652}, {'end': 43.51, 'text': 'so now, first of all, we will see the logical view of a linked list.', 'start': 39.945, 'duration': 3.565}], 'summary': 'The video covers the basics of singly linked lists, dynamic memory allocation, pointers, and structures in c language.', 'duration': 43.481, 'max_score': 0.029, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs29.jpg'}], 'start': 0.029, 'title': 'Basics of singly linked list implementation', 'summary': 'Covers the basics of singly linked lists, including the logical view and the prerequisites of knowledge in dynamic memory allocation, pointers, and structures in c language.', 'chapters': [{'end': 43.51, 'start': 0.029, 'title': 'Basics of singly linked list implementation', 'summary': 'Covers the basics of singly linked lists, including the logical view and the prerequisites of knowledge in dynamic memory allocation, pointers, and structures in c language.', 'duration': 43.481, 'highlights': ['The chapter emphasizes the importance of understanding the basics of singly linked lists and their logical view.', 'It requires knowledge of dynamic memory allocation, malloc function, pointers, and structures in C language for implementation.', 'Understanding the logical view of a linked list is the initial focus of the chapter.']}], 'duration': 43.481, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs29.jpg', 'highlights': ['Understanding the logical view of a linked list is the initial focus of the chapter.', 'The chapter emphasizes the importance of understanding the basics of singly linked lists and their logical view.', 'It requires knowledge of dynamic memory allocation, malloc function, pointers, and structures in C language for implementation.']}, {'end': 463.663, 'segs': [{'end': 83.44, 'src': 'embed', 'start': 43.51, 'weight': 0, 'content': [{'end': 45.613, 'text': "i'm going to create a linked list here.", 'start': 43.51, 'duration': 2.103}, {'end': 48.717, 'text': "i'm just going to draw a linked list here, having three nodes only.", 'start': 45.613, 'duration': 3.104}, {'end': 52.7, 'text': 'so this is you can see a logical view of a linked list having three nodes.', 'start': 49.258, 'duration': 3.442}, {'end': 54.462, 'text': 'this complete is known as a node.', 'start': 52.7, 'duration': 1.762}, {'end': 55.222, 'text': 'what is a linked list?', 'start': 54.462, 'duration': 0.76}, {'end': 56.263, 'text': 'how to represent this?', 'start': 55.222, 'duration': 1.041}, {'end': 57.183, 'text': 'i have already discussed.', 'start': 56.263, 'duration': 0.92}, {'end': 59.265, 'text': 'i will provide you the link of that video in the side button.', 'start': 57.183, 'duration': 2.082}, {'end': 60.546, 'text': 'you can check out there.', 'start': 59.265, 'duration': 1.281}, {'end': 64.647, 'text': 'in the last node in the address part, see two parts of node are there.', 'start': 60.546, 'duration': 4.101}, {'end': 65.949, 'text': 'this one is data part.', 'start': 64.647, 'duration': 1.302}, {'end': 66.83, 'text': 'this node is.', 'start': 65.949, 'duration': 0.881}, {'end': 73.975, 'text': 'this part of the node is going to store actual data and this part is going to store address, address of next node.', 'start': 66.83, 'duration': 7.145}, {'end': 76.076, 'text': "right, that is why here i'm going to store 200.", 'start': 73.975, 'duration': 2.101}, {'end': 81.179, 'text': "here i'm going to store 300, 100, 200, 300 are random addresses.", 'start': 76.076, 'duration': 5.103}, {'end': 83.44, 'text': 'these addresses are in hexadecimal form.', 'start': 81.179, 'duration': 2.261}], 'summary': 'The linked list has three nodes, storing data and addresses in hexadecimal form.', 'duration': 39.93, 'max_score': 43.51, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs43510.jpg'}, {'end': 138.16, 'src': 'embed', 'start': 110.33, 'weight': 3, 'content': [{'end': 112.592, 'text': 'fine, and this is what a head pointer.', 'start': 110.33, 'duration': 2.262}, {'end': 116.938, 'text': 'head pointer is going to store address of first node.', 'start': 112.592, 'duration': 4.346}, {'end': 120.202, 'text': 'always we are going to have in program when you are writing a program.', 'start': 116.938, 'duration': 3.264}, {'end': 125.077, 'text': 'in that case you have to maintain what this head pointer now see.', 'start': 120.202, 'duration': 4.875}, {'end': 130.739, 'text': "first of all, we don't have any node in the linked list, right, and we are going to create a linked list having three nodes.", 'start': 125.077, 'duration': 5.662}, {'end': 135.96, 'text': 'you are going to create this one and after that we are going to display the content of the nodes.', 'start': 130.739, 'duration': 5.221}, {'end': 138.16, 'text': 'that is five, four and nine.', 'start': 135.96, 'duration': 2.2}], 'summary': 'Introduction to head pointer in linked list and creation of a list with 3 nodes (5, 4, and 9).', 'duration': 27.83, 'max_score': 110.33, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs110330.jpg'}, {'end': 333.891, 'src': 'heatmap', 'start': 293.522, 'weight': 0.77, 'content': [{'end': 297.043, 'text': 'fine. in c++ you can simply write this node.', 'start': 293.522, 'duration': 3.521}, {'end': 297.983, 'text': 'that is fine.', 'start': 297.043, 'duration': 0.94}, {'end': 299.744, 'text': 'but here i am discussing c language.', 'start': 297.983, 'duration': 1.761}, {'end': 304.111, 'text': 'fine. now we have created this head node.', 'start': 300.626, 'duration': 3.485}, {'end': 315.343, 'text': "initially. suppose we don't have any node in the list, so initially what head pointer will store head is going to contain what zero?", 'start': 304.111, 'duration': 11.232}, {'end': 316.904, 'text': 'or you can say null.', 'start': 315.343, 'duration': 1.561}, {'end': 319.365, 'text': 'now we are going to create a node.', 'start': 316.904, 'duration': 2.461}, {'end': 325.508, 'text': 'fine. now you will write something such that memory is to be allocated for this node.', 'start': 319.365, 'duration': 6.143}, {'end': 328.049, 'text': 'so now here we are going to use what dynamic memory allocation,', 'start': 325.508, 'duration': 2.541}, {'end': 333.891, 'text': 'that is malloc function in c language you are going to use malloc function in c plus plus you can use new keyword.', 'start': 328.049, 'duration': 5.842}], 'summary': 'Discusses creating and allocating memory for a head node in c language.', 'duration': 40.369, 'max_score': 293.522, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs293522.jpg'}, {'end': 430.425, 'src': 'embed', 'start': 400.848, 'weight': 2, 'content': [{'end': 404.03, 'text': 'now, see this malloc is what what it is going to return.', 'start': 400.848, 'duration': 3.182}, {'end': 411.755, 'text': 'malloc is a method or a function which is going to return a pointer to the starting address of that memory block,', 'start': 404.03, 'duration': 7.725}, {'end': 415.036, 'text': 'because memory block of 8 bytes has been allocated.', 'start': 411.755, 'duration': 3.281}, {'end': 422.081, 'text': 'fine, so it is going to return a pointer to the starting address of that memory block.', 'start': 415.036, 'duration': 7.045}, {'end': 427.124, 'text': 'fine, so malloc is going to return what pointer, or you can say it is going to return a void pointer.', 'start': 422.081, 'duration': 5.043}, {'end': 430.425, 'text': 'so now what this malloc is going to return.', 'start': 428.044, 'duration': 2.381}], 'summary': 'Malloc returns a pointer to the starting address of an 8-byte memory block.', 'duration': 29.577, 'max_score': 400.848, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs400848.jpg'}], 'start': 43.51, 'title': 'Creating a linked list in c', 'summary': 'Covers the process of creating a linked list in c, including logical view, programming representation, node creation, and memory allocation with malloc function.', 'chapters': [{'end': 463.663, 'start': 43.51, 'title': 'Creating a linked list in c', 'summary': 'Illustrates the process of creating a linked list in c, covering the logical view, programming representation, node creation, and memory allocation using malloc function.', 'duration': 420.153, 'highlights': ['The chapter illustrates the process of creating a linked list in C Covers the logical view, programming representation, node creation, and memory allocation using malloc function.', 'Explanation of node structure and data representation The node contains a data part and an address part, storing actual data and addresses of next nodes respectively.', 'Memory allocation using malloc function in C malloc function allocates memory for the node, returning a pointer to the starting address of the memory block.', 'Demonstration of pointer declaration and head pointer usage Explanation of declaring a head pointer to store the address of the first node and the usage of pointer variables in the linked list.']}], 'duration': 420.153, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs43510.jpg', 'highlights': ['The chapter illustrates the process of creating a linked list in C Covers the logical view, programming representation, node creation, and memory allocation using malloc function.', 'Explanation of node structure and data representation The node contains a data part and an address part, storing actual data and addresses of next nodes respectively.', 'Memory allocation using malloc function in C malloc function allocates memory for the node, returning a pointer to the starting address of the memory block.', 'Demonstration of pointer declaration and head pointer usage Explanation of declaring a head pointer to store the address of the first node and the usage of pointer variables in the linked list.']}, {'end': 947.532, 'segs': [{'end': 541.85, 'src': 'embed', 'start': 489.393, 'weight': 0, 'content': [{'end': 496.856, 'text': 'fine, because malloc is always going to return what pointer to the starting address and it is going to return what void pointer.', 'start': 489.393, 'duration': 7.463}, {'end': 498.337, 'text': 'see this new node.', 'start': 496.856, 'duration': 1.481}, {'end': 500.218, 'text': 'you can say here we are we are going to take.', 'start': 498.337, 'duration': 1.881}, {'end': 504.017, 'text': 'this is what new node.', 'start': 501.857, 'duration': 2.16}, {'end': 506.078, 'text': 'this is just a pointer.', 'start': 504.017, 'duration': 2.061}, {'end': 512.119, 'text': 'now, whatever the address the malloc function is going to return, we are going to store that address into this new node pointer.', 'start': 506.078, 'duration': 6.041}, {'end': 515.219, 'text': 'that is pointer to node but it is going to return what void pointer.', 'start': 512.119, 'duration': 3.1}, {'end': 517.6, 'text': 'so you have to typecast this one.', 'start': 515.219, 'duration': 2.381}, {'end': 528.682, 'text': 'fine. so for typecasting here you will write what struct node asterisk, because we are dealing with a pointer to node.', 'start': 517.6, 'duration': 11.082}, {'end': 534.446, 'text': 'fine and the address we are going to store in new node address.', 'start': 528.682, 'duration': 5.764}, {'end': 538.749, 'text': 'the type is this this is what a pointer to node.', 'start': 534.446, 'duration': 4.303}, {'end': 539.989, 'text': 'so the type is what.', 'start': 538.749, 'duration': 1.24}, {'end': 541.85, 'text': 'struct node asterisk.', 'start': 539.989, 'duration': 1.861}], 'summary': 'Using malloc to allocate memory for a new node and typecasting the void pointer to struct node pointer.', 'duration': 52.457, 'max_score': 489.393, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs489393.jpg'}, {'end': 670.644, 'src': 'heatmap', 'start': 590.215, 'weight': 1, 'content': [{'end': 601.923, 'text': 'using this uh pointer, then what is the that syntax address of see, using this pointer variable we are going to access this node.', 'start': 590.215, 'duration': 11.708}, {'end': 605.445, 'text': 'fine, because we have just the address of this node.', 'start': 601.923, 'duration': 3.522}, {'end': 610.068, 'text': 'so how you will write the pointer name, new node.', 'start': 605.445, 'duration': 4.623}, {'end': 619.859, 'text': 'then you will write what this arrow symbol, and now you will write that name of that variable, the name of that structure member.', 'start': 610.068, 'duration': 9.791}, {'end': 620.959, 'text': 'that is data.', 'start': 619.859, 'duration': 1.1}, {'end': 627.203, 'text': 'this is how you can access the members of a structure using pointer.', 'start': 620.959, 'duration': 6.244}, {'end': 635.408, 'text': "fine, using dot operator you can also use but here i'm using this arrow method, because this is what easy to use.", 'start': 627.203, 'duration': 8.205}, {'end': 638.21, 'text': 'now, see, suppose, user has entered what this five.', 'start': 635.408, 'duration': 2.802}, {'end': 640.411, 'text': 'so here you will write what five.', 'start': 638.21, 'duration': 2.201}, {'end': 644.012, 'text': 'and in this, here now we have only one node.', 'start': 640.411, 'duration': 3.601}, {'end': 647.274, 'text': 'so here you can insert what null or zero.', 'start': 644.012, 'duration': 3.262}, {'end': 648.875, 'text': 'so here you can insert zero.', 'start': 647.274, 'duration': 1.601}, {'end': 660.499, 'text': 'so here you can write what this new node, arrow operator, and for this part this is what the pointer pointer name is next.', 'start': 648.875, 'duration': 11.624}, {'end': 664.441, 'text': 'so here you can write next is equal to zero.', 'start': 660.499, 'duration': 3.942}, {'end': 666.722, 'text': 'so this is how we are going to access the structure member.', 'start': 664.441, 'duration': 2.281}, {'end': 670.644, 'text': 'see this, this address part also we can access using this pointer.', 'start': 666.722, 'duration': 3.922}], 'summary': 'Access structure members using pointer in c, an easy method for data manipulation.', 'duration': 21.769, 'max_score': 590.215, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs590215.jpg'}, {'end': 751.676, 'src': 'heatmap', 'start': 725.787, 'weight': 0.745, 'content': [{'end': 732.05, 'text': 'so now the list is having only one node, that is this one, and head is going to contain address of this.', 'start': 725.787, 'duration': 6.263}, {'end': 735.272, 'text': 'so how we can write this head is equal to new node.', 'start': 732.05, 'duration': 3.222}, {'end': 741.873, 'text': 'so simply, here you can write head is equal to new node.', 'start': 735.272, 'duration': 6.601}, {'end': 744.894, 'text': 'fine, this 100 would be stored here and this is going to point here.', 'start': 741.873, 'duration': 3.021}, {'end': 751.676, 'text': 'now, fine, now, suppose you are going to insert one and you are going to create another node and you are going to insert here.', 'start': 744.894, 'duration': 6.782}], 'summary': 'Creating a linked list with one node and inserting a new node.', 'duration': 25.889, 'max_score': 725.787, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs725787.jpg'}, {'end': 852.307, 'src': 'embed', 'start': 827.438, 'weight': 2, 'content': [{'end': 834.021, 'text': 'so now we have created one more node and we are going to insert, we are going to insert this node in the list also,', 'start': 827.438, 'duration': 6.583}, {'end': 838.962, 'text': 'because here we have only one node in the list head and this one.', 'start': 834.021, 'duration': 4.941}, {'end': 841.723, 'text': 'so here we are going to store this new node.', 'start': 838.962, 'duration': 2.761}, {'end': 843.664, 'text': 'so you have to update the pointers now.', 'start': 841.723, 'duration': 1.941}, {'end': 845.685, 'text': 'in this case, head is equal to not null.', 'start': 843.664, 'duration': 2.021}, {'end': 850.646, 'text': 'head is going having 100, the address of the first node.', 'start': 845.685, 'duration': 4.961}, {'end': 852.307, 'text': 'so this we cannot do now.', 'start': 850.646, 'duration': 1.661}], 'summary': 'Creating and inserting a new node in the list, updating pointers.', 'duration': 24.869, 'max_score': 827.438, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs827438.jpg'}, {'end': 908.755, 'src': 'embed', 'start': 877.13, 'weight': 4, 'content': [{'end': 878.971, 'text': 'so you cannot destroy this link.', 'start': 877.13, 'duration': 1.841}, {'end': 883.283, 'text': 'so simply you cannot write this thing.', 'start': 880.202, 'duration': 3.081}, {'end': 885.444, 'text': 'that is why we are going to write this condition.', 'start': 883.283, 'duration': 2.161}, {'end': 887.805, 'text': 'if head is equal to null, then you can write this thing.', 'start': 885.444, 'duration': 2.361}, {'end': 888.926, 'text': 'then it is right.', 'start': 887.805, 'duration': 1.121}, {'end': 892.467, 'text': 'if head is equal to not null, then what you will do now see.', 'start': 888.926, 'duration': 3.541}, {'end': 897.99, 'text': 'so now, to insert this newly created node here in the list, what you will have to update.', 'start': 892.467, 'duration': 5.523}, {'end': 902.912, 'text': 'we are going to store address of this, this newly created node here.', 'start': 897.99, 'duration': 4.922}, {'end': 908.755, 'text': 'that is 200 here it means now this is now going to point what here?', 'start': 902.912, 'duration': 5.843}], 'summary': 'Discussing conditions for writing and updating nodes in a linked list.', 'duration': 31.625, 'max_score': 877.13, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs877130.jpg'}], 'start': 463.663, 'title': 'Pointer variable creation and dynamic memory allocation & linked list operations', 'summary': 'Explains creating a new pointer variable for a node in c, emphasizing typecasting and address storage, and discusses dynamic memory allocation for a linked list, focusing on inserting nodes, updating pointers, and memory management.', 'chapters': [{'end': 541.85, 'start': 463.663, 'title': 'Pointer variable creation', 'summary': 'Explains the process of creating a new pointer variable for a node in c programming, emphasizing the need for typecasting and the storage of addresses.', 'duration': 78.187, 'highlights': ['The chapter emphasizes the creation of a new pointer variable for a node in C programming, highlighting the need to store the address of the new node and the requirement for typecasting when dealing with void pointers.', 'The discussion emphasizes the use of malloc to obtain the starting address of a new node, making it crucial to store this address in the pointer variable for future reference.']}, {'end': 947.532, 'start': 541.85, 'title': 'Dynamic memory allocation & linked list operations', 'summary': 'Discusses dynamically allocating memory for a linked list, inserting nodes, updating pointers, and handling conditions for different scenarios, with a particular emphasis on pointer usage and memory management.', 'duration': 405.682, 'highlights': ['Explaining how to access structure members using pointers and arrow operator. Using the arrow operator to access structure members via pointers simplifies the process of accessing and updating data within the linked list.', 'Clarifying the process of inserting a new node into the linked list and updating pointers based on the current list structure. Detailed explanation of the steps involved in inserting a new node into the linked list and updating the pointers to maintain the integrity of the list structure.', 'Discussing the condition checks for inserting a new node into the linked list based on the current state of the list. Thorough explanation of the conditional checks required to determine the appropriate action for inserting a new node into the linked list based on the current state of the list.']}], 'duration': 483.869, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs463663.jpg', 'highlights': ['The chapter emphasizes the creation of a new pointer variable for a node in C programming, highlighting the need to store the address of the new node and the requirement for typecasting when dealing with void pointers.', 'Explaining how to access structure members using pointers and arrow operator. Using the arrow operator to access structure members via pointers simplifies the process of accessing and updating data within the linked list.', 'Clarifying the process of inserting a new node into the linked list and updating pointers based on the current list structure. Detailed explanation of the steps involved in inserting a new node into the linked list and updating the pointers to maintain the integrity of the list structure.', 'The discussion emphasizes the use of malloc to obtain the starting address of a new node, making it crucial to store this address in the pointer variable for future reference.', 'Discussing the condition checks for inserting a new node into the linked list based on the current state of the list. Thorough explanation of the conditional checks required to determine the appropriate action for inserting a new node into the linked list based on the current state of the list.']}, {'end': 1485.905, 'segs': [{'end': 1029.733, 'src': 'embed', 'start': 1002.236, 'weight': 2, 'content': [{'end': 1005.599, 'text': 'now how we are going to insert this newly created node here.', 'start': 1002.236, 'duration': 3.363}, {'end': 1011.864, 'text': 'after this, now in else node, whatever you have written see head of next is equal to new node.', 'start': 1005.599, 'duration': 6.265}, {'end': 1015.747, 'text': 'now, head of next, head of next, is what this one.', 'start': 1011.864, 'duration': 3.883}, {'end': 1019.428, 'text': 'because this head pointer is having 100, so we can access this.', 'start': 1015.747, 'duration': 3.681}, {'end': 1021.529, 'text': 'this is pointer to this node.', 'start': 1019.428, 'duration': 2.101}, {'end': 1024.351, 'text': 'so head next, head next means this one.', 'start': 1021.529, 'duration': 2.822}, {'end': 1026.372, 'text': 'so now here we are going to store new node.', 'start': 1024.351, 'duration': 2.021}, {'end': 1028.313, 'text': 'the new node is going to contain 300.', 'start': 1026.372, 'duration': 1.941}, {'end': 1029.733, 'text': 'so here we can insert.', 'start': 1028.313, 'duration': 1.42}], 'summary': 'Insert new node with value 300 next to head node.', 'duration': 27.497, 'max_score': 1002.236, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs1002236.jpg'}, {'end': 1081.882, 'src': 'embed', 'start': 1053.399, 'weight': 1, 'content': [{'end': 1055.7, 'text': 'now this node is not in the list.', 'start': 1053.399, 'duration': 2.301}, {'end': 1057.522, 'text': 'so now this you cannot write.', 'start': 1055.7, 'duration': 1.822}, {'end': 1064.447, 'text': 'so the solution of this problem is what you have to take one extra another pointer.', 'start': 1057.522, 'duration': 6.925}, {'end': 1069.887, 'text': 'here we are going to take one pointer, that is temp.', 'start': 1064.447, 'duration': 5.44}, {'end': 1071.409, 'text': 'one more pointer now.', 'start': 1069.887, 'duration': 1.522}, {'end': 1073.932, 'text': 'see what is the role of this temp.', 'start': 1071.409, 'duration': 2.523}, {'end': 1076.155, 'text': 'see, we cannot move this head pointer.', 'start': 1073.932, 'duration': 2.223}, {'end': 1081.882, 'text': 'we cannot change the, this value of this head pointer, because if you are going to change this value, then you will,', 'start': 1076.155, 'duration': 5.727}], 'summary': 'Solution: use an extra pointer temp to avoid altering head pointer.', 'duration': 28.483, 'max_score': 1053.399, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs1053399.jpg'}, {'end': 1393.212, 'src': 'embed', 'start': 1364.184, 'weight': 0, 'content': [{'end': 1365.244, 'text': 'so now this is our list.', 'start': 1364.184, 'duration': 1.06}, {'end': 1369.526, 'text': 'temp is pointing here, new node is also pointing here and head is pointing here.', 'start': 1365.244, 'duration': 4.282}, {'end': 1374.147, 'text': 'now, see, now you want to implement a program, something like this.', 'start': 1369.526, 'duration': 4.621}, {'end': 1376.468, 'text': 'you want to ask from the user do you want to continue?', 'start': 1374.147, 'duration': 2.321}, {'end': 1381.349, 'text': 'if user press 1, then you are going to create another node.', 'start': 1376.468, 'duration': 4.881}, {'end': 1383.149, 'text': 'fine, again, this code is going to run.', 'start': 1381.349, 'duration': 1.8}, {'end': 1388.611, 'text': 'if user press 0, it means you are not going to create another node.', 'start': 1383.149, 'duration': 5.462}, {'end': 1391.211, 'text': 'now you are going to print these values.', 'start': 1388.611, 'duration': 2.6}, {'end': 1393.212, 'text': 'fine, so for that what you will write.', 'start': 1391.211, 'duration': 2.001}], 'summary': 'Implement a program to create nodes based on user input.', 'duration': 29.028, 'max_score': 1364.184, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs1364184.jpg'}], 'start': 947.532, 'title': 'Node insertion in linked lists', 'summary': 'Elaborates on the process of inserting new nodes in a linked list, including the use of additional pointers and iterative methods, illustrated through specific examples and pointer manipulations.', 'chapters': [{'end': 1053.399, 'start': 947.532, 'title': 'Linked list node insertion', 'summary': 'Explains the process of inserting a new node in a linked list, using a specific example of creating a third node and detailing the pointer manipulations involved in the process.', 'duration': 105.867, 'highlights': ['The process details the creation and insertion of a new node in a linked list, with specific addresses and data values mentioned (e.g., address 300, data value 9), demonstrating the pointer manipulations involved.', 'The explanation highlights the specific code logic for inserting a new node in an else node, detailing the pointer assignments and the resulting link manipulations in the linked list.', 'The chapter includes a detailed example of the potential loss of link to a node in a specific scenario, highlighting the consequences of improper pointer manipulations in linked list operations.']}, {'end': 1485.905, 'start': 1053.399, 'title': 'Inserting nodes in a linked list', 'summary': "Discusses the need for an extra pointer 'temp' to insert new nodes in a linked list without altering the head pointer, and the iterative process of creating and linking nodes in the list, exemplified with the use of 'temp' and 'new node' pointers.", 'duration': 432.506, 'highlights': ["The chapter discusses the need for an extra pointer 'temp' to insert new nodes in a linked list without altering the head pointer. The solution to the problem of inserting nodes in a linked list without altering the head pointer involves using an extra pointer 'temp' to traverse the list and insert new nodes without losing the reference to the first node.", "The iterative process of creating and linking nodes in the list is exemplified with the use of 'temp' and 'new node' pointers. The iterative process of creating and linking nodes in a linked list is demonstrated, with the use of 'temp' and 'new node' pointers to create and link new nodes in the list, ensuring the proper insertion of nodes.", "The chapter exemplifies the need for an extra pointer 'temp' and the iterative process of creating and linking nodes in the list. The chapter underscores the significance of using an extra pointer 'temp' and the iterative process of creating and linking nodes in a linked list, emphasizing the importance of proper node insertion."]}], 'duration': 538.373, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs947532.jpg', 'highlights': ["The iterative process of creating and linking nodes in a linked list is demonstrated, with the use of 'temp' and 'new node' pointers to create and link new nodes in the list, ensuring the proper insertion of nodes.", "The chapter discusses the need for an extra pointer 'temp' to insert new nodes in a linked list without altering the head pointer. The solution to the problem of inserting nodes in a linked list without altering the head pointer involves using an extra pointer 'temp' to traverse the list and insert new nodes without losing the reference to the first node.", 'The explanation highlights the specific code logic for inserting a new node in an else node, detailing the pointer assignments and the resulting link manipulations in the linked list.']}, {'end': 1740.445, 'segs': [{'end': 1545.139, 'src': 'heatmap', 'start': 1496.515, 'weight': 0, 'content': [{'end': 1502.217, 'text': 'you first of all, you can see you are going to print the values five, then this four, then this nine.', 'start': 1496.515, 'duration': 5.702}, {'end': 1505.797, 'text': 'we cannot move this head pointer.', 'start': 1502.217, 'duration': 3.58}, {'end': 1509.338, 'text': 'so that is why again, now, at last, temp was here.', 'start': 1505.797, 'duration': 3.541}, {'end': 1513.839, 'text': 'so again we are going to initialize this temp from here right.', 'start': 1509.338, 'duration': 4.501}, {'end': 1518.04, 'text': 'so in temp, first of all you are going to store temp is equal to head.', 'start': 1513.839, 'duration': 4.201}, {'end': 1523.563, 'text': 'now in temp we are having 100.', 'start': 1520.922, 'duration': 2.641}, {'end': 1528.025, 'text': 'so now temp is pointing here.', 'start': 1523.563, 'duration': 4.462}, {'end': 1530.766, 'text': 'so now you are going to print 5, 4 and 9.', 'start': 1528.025, 'duration': 2.741}, {'end': 1539.27, 'text': 'so here you will write a while loop, while temp not equal to null.', 'start': 1530.766, 'duration': 8.504}, {'end': 1545.139, 'text': 'fine, Till then you are going to run this loop and you will print this value.', 'start': 1539.27, 'duration': 5.869}], 'summary': 'Printed values: 5, 4, 9. used a while loop to iterate and print.', 'duration': 59.234, 'max_score': 1496.515, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs1496515.jpg'}, {'end': 1737.747, 'src': 'embed', 'start': 1709.608, 'weight': 1, 'content': [{'end': 1717.753, 'text': 'fine, here only and here count plus, plus and after this, while loop, you can print this count value, printf, %d and count.', 'start': 1709.608, 'duration': 8.145}, {'end': 1721.836, 'text': 'so this three would be printed because here in this case we have three nodes.', 'start': 1717.753, 'duration': 4.083}, {'end': 1725.699, 'text': 'so this is how you can create node and traverse the list.', 'start': 1721.836, 'duration': 3.863}, {'end': 1727.68, 'text': 'i hope you got the concept.', 'start': 1725.699, 'duration': 1.981}, {'end': 1737.747, 'text': 'in next video we will discuss how to insert newly created node in the list at beginning, also at any position also, and at end of the list.', 'start': 1727.68, 'duration': 10.067}], 'summary': 'Demonstrated creating and traversing nodes in a list with 3 nodes.', 'duration': 28.139, 'max_score': 1709.608, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs1709608.jpg'}], 'start': 1485.905, 'title': 'Linked list traversal and pointer manipulation in c', 'summary': 'Explains how to traverse and print the values in a linked list using a while loop and the importance of initializing the temporary pointer with example values 5, 4, and 9. it also discusses pointer manipulation in c, including accessing data through pointers, traversing a linked list, and counting the number of nodes, with an example of creating and traversing a list with 3 nodes in c.', 'chapters': [{'end': 1545.139, 'start': 1485.905, 'title': 'Traversing and printing linked list', 'summary': 'Explains how to traverse and print the values in a linked list using a while loop and the importance of initializing the temporary pointer, with the example values 5, 4, and 9.', 'duration': 59.234, 'highlights': ['The chapter emphasizes the importance of initializing the temporary pointer before traversing the linked list, demonstrated with the example of initializing the temporary pointer with the value 100.', 'The chapter demonstrates the use of a while loop to traverse the linked list until the temporary pointer is not equal to null, highlighting the process of printing the values 5, 4, and 9 in the linked list.']}, {'end': 1740.445, 'start': 1545.68, 'title': 'Pointer manipulation in c', 'summary': 'Discusses pointer manipulation in c, including accessing data through pointers, traversing a linked list, and counting the number of nodes, with an example of creating and traversing a list with 3 nodes in c.', 'duration': 194.765, 'highlights': ['Accessing data through pointers and traversing a linked list is demonstrated in C, with an example of creating and traversing a list with 3 nodes.', 'The process includes accessing data through pointers, traversing the list, and counting the number of nodes, demonstrating the concept in C.', 'The chapter concludes with a preview of the next video, outlining the discussion of inserting newly created nodes at the beginning, any position, and end of the list in C.']}], 'duration': 254.54, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6wXZ_m3SbEs/pics/6wXZ_m3SbEs1485905.jpg', 'highlights': ['The chapter emphasizes the importance of initializing the temporary pointer before traversing the linked list, demonstrated with the example of initializing the temporary pointer with the value 100.', 'Accessing data through pointers and traversing a linked list is demonstrated in C, with an example of creating and traversing a list with 3 nodes.', 'The chapter demonstrates the use of a while loop to traverse the linked list until the temporary pointer is not equal to null, highlighting the process of printing the values 5, 4, and 9 in the linked list.', 'The process includes accessing data through pointers, traversing the list, and counting the number of nodes, demonstrating the concept in C.']}], 'highlights': ['Understanding the logical view of a linked list is the initial focus of the chapter.', 'The chapter emphasizes the importance of understanding the basics of singly linked lists and their logical view.', 'It requires knowledge of dynamic memory allocation, malloc function, pointers, and structures in C language for implementation.', 'The chapter illustrates the process of creating a linked list in C Covers the logical view, programming representation, node creation, and memory allocation using malloc function.', 'Explanation of node structure and data representation The node contains a data part and an address part, storing actual data and addresses of next nodes respectively.', 'Memory allocation using malloc function in C malloc function allocates memory for the node, returning a pointer to the starting address of the memory block.', 'Demonstration of pointer declaration and head pointer usage Explanation of declaring a head pointer to store the address of the first node and the usage of pointer variables in the linked list.', 'The chapter emphasizes the creation of a new pointer variable for a node in C programming, highlighting the need to store the address of the new node and the requirement for typecasting when dealing with void pointers.', 'Explaining how to access structure members using pointers and arrow operator. Using the arrow operator to access structure members via pointers simplifies the process of accessing and updating data within the linked list.', 'Clarifying the process of inserting a new node into the linked list and updating pointers based on the current list structure. Detailed explanation of the steps involved in inserting a new node into the linked list and updating the pointers to maintain the integrity of the list structure.', 'The discussion emphasizes the use of malloc to obtain the starting address of a new node, making it crucial to store this address in the pointer variable for future reference.', 'Discussing the condition checks for inserting a new node into the linked list based on the current state of the list. Thorough explanation of the conditional checks required to determine the appropriate action for inserting a new node into the linked list based on the current state of the list.', "The iterative process of creating and linking nodes in a linked list is demonstrated, with the use of 'temp' and 'new node' pointers to create and link new nodes in the list, ensuring the proper insertion of nodes.", "The chapter discusses the need for an extra pointer 'temp' to insert new nodes in a linked list without altering the head pointer. The solution to the problem of inserting nodes in a linked list without altering the head pointer involves using an extra pointer 'temp' to traverse the list and insert new nodes without losing the reference to the first node.", 'The explanation highlights the specific code logic for inserting a new node in an else node, detailing the pointer assignments and the resulting link manipulations in the linked list.', 'The chapter emphasizes the importance of initializing the temporary pointer before traversing the linked list, demonstrated with the example of initializing the temporary pointer with the value 100.', 'Accessing data through pointers and traversing a linked list is demonstrated in C, with an example of creating and traversing a list with 3 nodes.', 'The chapter demonstrates the use of a while loop to traverse the linked list until the temporary pointer is not equal to null, highlighting the process of printing the values 5, 4, and 9 in the linked list.', 'The process includes accessing data through pointers, traversing the list, and counting the number of nodes, demonstrating the concept in C.']}