title
2.12 Deletion from Doubly Linked List (beginning,end,specific position) | Data Structures Tutorials
description
In this video, I have explained deletion from doubly linked list with C program. I have explained all the cases: (with examples)
deletion from beginning
deletion from end
deletion from 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/
#doublylinkedlist, #jennyslectures, #linkedlist, #datastructures
detail
{'title': '2.12 Deletion from Doubly Linked List (beginning,end,specific position) | Data Structures Tutorials', 'heatmap': [{'end': 427.197, 'start': 396.881, 'weight': 1}, {'end': 559.689, 'start': 537.646, 'weight': 0.736}, {'end': 641.722, 'start': 594.172, 'weight': 0.744}, {'end': 768.939, 'start': 740.811, 'weight': 0.929}, {'end': 1144.443, 'start': 1111.624, 'weight': 0.763}], 'summary': 'Tutorial covers deleting data from double linked lists, including deletion from beginning, end, or specific position, emphasizing freeing memory in c, updating pointers, maintaining tail pointer, and achieving o(1) time complexity for deleting a node from the end.', 'chapters': [{'end': 518.238, 'segs': [{'end': 28.13, 'src': 'embed', 'start': 0.129, 'weight': 0, 'content': [{'end': 3.992, 'text': "right. so i'll provide you the link of all these video in the description box as well.", 'start': 0.129, 'duration': 3.863}, {'end': 5.152, 'text': 'as you can check out this.', 'start': 3.992, 'duration': 1.16}, {'end': 6.333, 'text': 'i button fine.', 'start': 5.152, 'duration': 1.181}, {'end': 14.538, 'text': 'in this video we will see how to delete data delete from beginning, delete from end and delete from a specific position.', 'start': 6.333, 'duration': 8.205}, {'end': 17.16, 'text': 'or you can say delete from any given position.', 'start': 14.538, 'duration': 2.622}, {'end': 25.349, 'text': 'fine, see, suppose i assume that we have created a double linked list having three nodes, two pointers.', 'start': 18.046, 'duration': 7.303}, {'end': 28.13, 'text': 'we have one is tail pointer and one is head pointer.', 'start': 25.349, 'duration': 2.781}], 'summary': 'Demonstrating video link and deletion methods in double linked list.', 'duration': 28.001, 'max_score': 0.129, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE129.jpg'}, {'end': 134.994, 'src': 'embed', 'start': 109.919, 'weight': 4, 'content': [{'end': 115.241, 'text': 'but second task is, you have to free this memory because, see, memory is very crucial part.', 'start': 109.919, 'duration': 5.322}, {'end': 117.222, 'text': 'so we cannot leave it like this.', 'start': 115.241, 'duration': 1.981}, {'end': 119.123, 'text': 'this is just a garbage now.', 'start': 117.222, 'duration': 1.901}, {'end': 120.843, 'text': 'so you have to clean this garbage now.', 'start': 119.123, 'duration': 1.72}, {'end': 122.344, 'text': 'how you can free this memory?', 'start': 120.843, 'duration': 1.501}, {'end': 125.151, 'text': 'you can use a free function.', 'start': 123.308, 'duration': 1.843}, {'end': 134.994, 'text': 'in C we are using free function and in free function what you a pointer to this node or you can say address of this node, that is 200 fine.', 'start': 125.151, 'duration': 9.843}], 'summary': 'The task is to free memory using the free function in c, specifically addressing the node at address 200.', 'duration': 25.075, 'max_score': 109.919, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE109919.jpg'}, {'end': 427.197, 'src': 'heatmap', 'start': 396.881, 'weight': 1, 'content': [{'end': 398.183, 'text': 'temp is containing this address.', 'start': 396.881, 'duration': 1.302}, {'end': 399.004, 'text': 'so here i can write.', 'start': 398.183, 'duration': 0.821}, {'end': 405.044, 'text': 'and now this node has been deleted.', 'start': 403.123, 'duration': 1.921}, {'end': 407.546, 'text': 'the memory has been freed.', 'start': 405.044, 'duration': 2.502}, {'end': 410.347, 'text': 'now this is how you can delete a data from the beginning.', 'start': 407.546, 'duration': 2.801}, {'end': 413.089, 'text': 'these four lines code would be there.', 'start': 410.347, 'duration': 2.742}, {'end': 416.491, 'text': 'fine, now we will see how to delete from end.', 'start': 413.089, 'duration': 3.402}, {'end': 419.673, 'text': 'so now to delete this node, what you have to do?', 'start': 416.491, 'duration': 3.182}, {'end': 421.634, 'text': 'you need to break these links.', 'start': 419.673, 'duration': 1.961}, {'end': 424.936, 'text': 'fine means you have to store here what zero means.', 'start': 421.634, 'duration': 3.302}, {'end': 427.197, 'text': 'this node is not pointing to any node.', 'start': 424.936, 'duration': 2.261}], 'summary': 'Demonstrates deletion of nodes in a linked list.', 'duration': 30.316, 'max_score': 396.881, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE396881.jpg'}, {'end': 435.333, 'src': 'embed', 'start': 403.123, 'weight': 1, 'content': [{'end': 405.044, 'text': 'and now this node has been deleted.', 'start': 403.123, 'duration': 1.921}, {'end': 407.546, 'text': 'the memory has been freed.', 'start': 405.044, 'duration': 2.502}, {'end': 410.347, 'text': 'now this is how you can delete a data from the beginning.', 'start': 407.546, 'duration': 2.801}, {'end': 413.089, 'text': 'these four lines code would be there.', 'start': 410.347, 'duration': 2.742}, {'end': 416.491, 'text': 'fine, now we will see how to delete from end.', 'start': 413.089, 'duration': 3.402}, {'end': 419.673, 'text': 'so now to delete this node, what you have to do?', 'start': 416.491, 'duration': 3.182}, {'end': 421.634, 'text': 'you need to break these links.', 'start': 419.673, 'duration': 1.961}, {'end': 424.936, 'text': 'fine means you have to store here what zero means.', 'start': 421.634, 'duration': 3.302}, {'end': 427.197, 'text': 'this node is not pointing to any node.', 'start': 424.936, 'duration': 2.261}, {'end': 429.639, 'text': 'now, fine, how we can access this part.', 'start': 427.197, 'duration': 2.442}, {'end': 435.333, 'text': "See, obviously we don't have any pointer pointing to this node, because directly we cannot access this part.", 'start': 430.399, 'duration': 4.934}], 'summary': 'Demonstrating node deletion and memory management in code.', 'duration': 32.21, 'max_score': 403.123, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE403123.jpg'}, {'end': 478.559, 'src': 'embed', 'start': 449.307, 'weight': 3, 'content': [{'end': 450.708, 'text': 'after that you can delete this data.', 'start': 449.307, 'duration': 1.401}, {'end': 453.169, 'text': 'but we have already a tail pointer pointing to this node.', 'start': 450.708, 'duration': 2.461}, {'end': 458.211, 'text': 'now no need of traversal order of one time take would be taken for deleting this node.', 'start': 453.169, 'duration': 5.042}, {'end': 462.092, 'text': 'see now how we can update this part.', 'start': 458.211, 'duration': 3.881}, {'end': 465.434, 'text': 'see how you can access this part.', 'start': 462.092, 'duration': 3.342}, {'end': 468.455, 'text': 'the address of this node is what 400 from where i can get 400.', 'start': 465.434, 'duration': 3.021}, {'end': 472.277, 'text': 'here we have 400 fine, and the pointer to this node is tail.', 'start': 468.455, 'duration': 3.822}, {'end': 475.138, 'text': 'it means tail previous, fine.', 'start': 472.277, 'duration': 2.861}, {'end': 478.559, 'text': 'we have reached here now how we can access this part.', 'start': 475.138, 'duration': 3.421}], 'summary': 'Discussion about updating and accessing node address 400 and tail pointer.', 'duration': 29.252, 'max_score': 449.307, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE449307.jpg'}], 'start': 0.129, 'title': 'Deleting nodes in linked lists', 'summary': 'Covers deleting data from double linked lists, including deletion from beginning, end, or specific position, and emphasizes on freeing memory in c when deleting nodes, and discusses the process of deleting nodes from a linked list, including updating pointers and maintaining tail pointer.', 'chapters': [{'end': 86.059, 'start': 0.129, 'title': 'Deleting data from double linked list', 'summary': 'Explains how to delete data from a double linked list, including deleting from the beginning, end, or a specific position, using pointers and node updates, and discusses maintaining head and tail pointers.', 'duration': 85.93, 'highlights': ['The chapter explains how to maintain head and tail pointers in a double linked list, where the head stores the address of the first node and the tail stores the address of the last node.', 'It discusses deleting a node from the beginning of the list, involving updating the head pointer to store the address of the next node and setting the previous link of the first node to null.', 'The video also covers deleting data from the end and a specific position in the double linked list, providing a comprehensive guide to managing and manipulating data within the list.']}, {'end': 190.611, 'start': 86.059, 'title': 'Deleting nodes and freeing memory in c', 'summary': "Discusses the importance of freeing memory in c when deleting nodes from a list, emphasizing the need to free allocated memory and explaining the use of a free function with a pointer to the node's address.", 'duration': 104.552, 'highlights': ["When detaching a node from a list in C, it is crucial to free the allocated memory to avoid leaving garbage data, which can be achieved using the free function with the pointer to the node's address.", "Emphasizes the importance of maintaining a pointer to the node when freeing memory and provides an example of creating a function 'delete from beginning' to handle the deletion process."]}, {'end': 518.238, 'start': 190.611, 'title': 'Deleting nodes in a linked list', 'summary': 'Discusses the process of deleting nodes from a linked list, covering the deletion of nodes from the beginning and end, involving updating pointers and breaking links, resulting in memory being freed. it also emphasizes the importance of maintaining a tail pointer for efficient deletion.', 'duration': 327.627, 'highlights': ['The process of deleting nodes from the beginning is explained, involving updating the head pointer, breaking links, and freeing memory, resulting in the efficient deletion of nodes. 4 lines of code are used for the deletion process.', 'The importance of maintaining a tail pointer for efficient deletion is highlighted, as it eliminates the need for list traversal and simplifies the process of accessing and updating pointers. The tail pointer allows for one-time traversal to delete a node.', 'The specific steps involved in deleting a node from the end are detailed, including updating the tail pointer, breaking links, and freeing memory to complete the deletion process. The process involves updating pointers, breaking two links, and freeing memory.']}], 'duration': 518.109, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE129.jpg', 'highlights': ['The video covers deleting data from the end and a specific position in the double linked list, providing a comprehensive guide to managing and manipulating data within the list.', 'The process of deleting nodes from the beginning is explained, involving updating the head pointer, breaking links, and freeing memory, resulting in the efficient deletion of nodes. 4 lines of code are used for the deletion process.', 'The specific steps involved in deleting a node from the end are detailed, including updating the tail pointer, breaking links, and freeing memory to complete the deletion process. The process involves updating pointers, breaking two links, and freeing memory.', 'The importance of maintaining a tail pointer for efficient deletion is highlighted, as it eliminates the need for list traversal and simplifies the process of accessing and updating pointers. The tail pointer allows for one-time traversal to delete a node.', "When detaching a node from a list in C, it is crucial to free the allocated memory to avoid leaving garbage data, which can be achieved using the free function with the pointer to the node's address."]}, {'end': 706.338, 'segs': [{'end': 569.599, 'src': 'heatmap', 'start': 537.646, 'weight': 2, 'content': [{'end': 543.441, 'text': 'first of all we will check if Tail is equal to is equal to 0..', 'start': 537.646, 'duration': 5.795}, {'end': 544.762, 'text': 'Core head is equal to is equal to 0.', 'start': 543.441, 'duration': 1.321}, {'end': 545.743, 'text': 'It means list is empty.', 'start': 544.762, 'duration': 0.981}, {'end': 547.205, 'text': 'So here what you can print simply.', 'start': 545.763, 'duration': 1.442}, {'end': 548.726, 'text': 'List is empty.', 'start': 547.505, 'duration': 1.221}, {'end': 552.05, 'text': 'Fine I guess you can all write down this thing.', 'start': 549.007, 'duration': 3.043}, {'end': 554.553, 'text': 'Now in else part what you will do.', 'start': 552.53, 'duration': 2.023}, {'end': 556.355, 'text': 'Now we will.', 'start': 555.914, 'duration': 0.441}, {'end': 559.689, 'text': 'initialize this temp pointer.', 'start': 558.188, 'duration': 1.501}, {'end': 562.372, 'text': 'temp is equal to tail.', 'start': 559.689, 'duration': 2.683}, {'end': 567.177, 'text': 'now temp is also containing 150 means temp is also pointing to this node.', 'start': 562.372, 'duration': 4.805}, {'end': 568.818, 'text': 'now we can update this temp value.', 'start': 567.177, 'duration': 1.641}, {'end': 569.599, 'text': 'now temp.', 'start': 568.818, 'duration': 0.781}], 'summary': 'The transcript discusses checking if the list is empty and updating the temp pointer.', 'duration': 24.837, 'max_score': 537.646, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE537646.jpg'}, {'end': 641.722, 'src': 'heatmap', 'start': 594.172, 'weight': 0.744, 'content': [{'end': 597.934, 'text': 'here we have 400 and pointer to this node is tail also and temp also.', 'start': 594.172, 'duration': 3.762}, {'end': 600.495, 'text': 'fine, so you can access this node using temp or tail.', 'start': 597.934, 'duration': 2.561}, {'end': 612.494, 'text': "so here i'm writing what tail of tail of previous fine and again double pointer, tail of previous means we have reached to this address.", 'start': 600.495, 'duration': 11.999}, {'end': 614.035, 'text': 'now this I want exactly.', 'start': 612.494, 'duration': 1.541}, {'end': 615.436, 'text': 'I want to reach till this location.', 'start': 614.035, 'duration': 1.401}, {'end': 618.898, 'text': 'and now this is what next.', 'start': 615.436, 'duration': 3.462}, {'end': 623.121, 'text': 'the name of this part is next is equal to 0.', 'start': 618.898, 'duration': 4.223}, {'end': 626.183, 'text': 'it means here now I have 0.', 'start': 623.121, 'duration': 3.062}, {'end': 627.544, 'text': 'now this link has been broken.', 'start': 626.183, 'duration': 1.361}, {'end': 632.636, 'text': 'fine, second thing, we are also going to update this tail.', 'start': 629.053, 'duration': 3.583}, {'end': 641.722, 'text': 'so in tail pointer what we are going to store, that is 400 address of this node now, from where i can get 400 from here.', 'start': 632.636, 'duration': 9.086}], 'summary': 'The node at address 400 is accessed through temp or tail, and the link is broken with next=0.', 'duration': 47.55, 'max_score': 594.172, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE594172.jpg'}, {'end': 706.338, 'src': 'embed', 'start': 657.421, 'weight': 0, 'content': [{'end': 660.663, 'text': 'right now i can free this memory.', 'start': 657.421, 'duration': 3.242}, {'end': 666.487, 'text': 'so so here simply you can write free temp, because the pointer to this node is temp.', 'start': 660.663, 'duration': 5.824}, {'end': 672.051, 'text': 'how we can access this address using temp and this is done now.', 'start': 666.487, 'duration': 5.564}, {'end': 674.353, 'text': 'now this node has been deleted.', 'start': 672.051, 'duration': 2.302}, {'end': 677.955, 'text': 'right. this is how we are going to delete a node from the end of the list.', 'start': 674.353, 'duration': 3.602}, {'end': 679.316, 'text': 'fine, and this will take time.', 'start': 677.955, 'duration': 1.361}, {'end': 684.718, 'text': 'complexity, order of one, because we just updated these links.', 'start': 679.316, 'duration': 5.402}, {'end': 695.729, 'text': "we haven't done any traversal and from beginning also it will take order of 1, because we just in that case also we have just updated the links.", 'start': 684.718, 'duration': 11.011}, {'end': 700.493, 'text': 'fine, now we will see how to delete a node from a specific position.', 'start': 695.729, 'duration': 4.764}, {'end': 703.075, 'text': 'now, before going to the third function, i want to tell you something.', 'start': 700.493, 'duration': 2.582}, {'end': 706.338, 'text': "see, if you don't get this double pointer concept, then what you can do?", 'start': 703.075, 'duration': 3.263}], 'summary': 'Deleting a node from the end and specific position with complexity o(1).', 'duration': 48.917, 'max_score': 657.421, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE657421.jpg'}], 'start': 519.818, 'title': 'Linked list operations', 'summary': 'Introduces singly linked list operations, including checking for an empty list, updating temp pointer, and emphasizes the importance of pointers in list management. it also explains deleting a node from the end with o(1) time complexity and hints at future node deletion from a specific position.', 'chapters': [{'end': 569.599, 'start': 519.818, 'title': 'Singly linked list operations', 'summary': 'Introduces the concept of maintaining a pointer in a singly linked list, with a focus on checking if the list is empty and updating the temp pointer, highlighting the importance of pointers in managing the list.', 'duration': 49.781, 'highlights': ["By maintaining a pointer 'temp' in the singly linked list, it allows efficient management of nodes and memory, improving the overall performance of the list.", "The chapter emphasizes the importance of checking if the list is empty, as it impacts the subsequent operations and outputs, providing a clear understanding of the list's state.", "The process of updating the 'temp' pointer is crucial for maintaining integrity and accurate traversal within the list, ensuring efficient access and modification of nodes."]}, {'end': 706.338, 'start': 569.599, 'title': 'Deleting a node from a linked list', 'summary': 'Explains the process of deleting a node from the end of a linked list, discussing the steps involved, updating pointers, and the time complexity, which is o(1). it also hints at a future explanation of deleting a node from a specific position.', 'duration': 136.739, 'highlights': ['The process of deleting a node from the end of a linked list is explained, involving setting a temp pointer, freeing the node, and updating the tail pointer, with a time complexity of O(1).', 'The concept of deleting a node from a specific position is hinted at for future explanation, emphasizing the importance of understanding the double pointer concept.']}], 'duration': 186.52, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE519818.jpg', 'highlights': ["By maintaining a pointer 'temp' in the singly linked list, it allows efficient management of nodes and memory, improving the overall performance of the list.", 'The process of deleting a node from the end of a linked list is explained, involving setting a temp pointer, freeing the node, and updating the tail pointer, with a time complexity of O(1).', "The chapter emphasizes the importance of checking if the list is empty, as it impacts the subsequent operations and outputs, providing a clear understanding of the list's state.", "The process of updating the 'temp' pointer is crucial for maintaining integrity and accurate traversal within the list, ensuring efficient access and modification of nodes.", 'The concept of deleting a node from a specific position is hinted at for future explanation, emphasizing the importance of understanding the double pointer concept.']}, {'end': 933.975, 'segs': [{'end': 735.047, 'src': 'embed', 'start': 707.139, 'weight': 0, 'content': [{'end': 709.861, 'text': "see, suppose we haven't updated this part.", 'start': 707.139, 'duration': 2.722}, {'end': 714.163, 'text': 'still we have this link pointing to this node and tail is not pointing to this.', 'start': 709.861, 'duration': 4.302}, {'end': 716.545, 'text': 'tail is still pointing to this one.', 'start': 714.163, 'duration': 2.382}, {'end': 719.835, 'text': 'tail is having now 150, fine.', 'start': 716.545, 'duration': 3.29}, {'end': 721.196, 'text': 'so first of all, what we can do.', 'start': 719.835, 'duration': 1.361}, {'end': 722.978, 'text': 'first, update this tail pointer.', 'start': 721.196, 'duration': 1.782}, {'end': 728.222, 'text': "so first you will write temp is equal to tail and after this line, don't write this line directly.", 'start': 722.978, 'duration': 5.244}, {'end': 728.882, 'text': 'line this line.', 'start': 728.222, 'duration': 0.66}, {'end': 729.803, 'text': 'tail is equal to tail.', 'start': 728.882, 'duration': 0.921}, {'end': 732.425, 'text': 'previous means tail is equal to tail.', 'start': 729.803, 'duration': 2.622}, {'end': 733.706, 'text': 'previous, that is 400.', 'start': 732.425, 'duration': 1.281}, {'end': 735.047, 'text': 'now it is having 400.', 'start': 733.706, 'duration': 1.341}], 'summary': 'Updating tail pointer to 400, now having 150.', 'duration': 27.908, 'max_score': 707.139, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE707139.jpg'}, {'end': 773.202, 'src': 'heatmap', 'start': 740.811, 'weight': 0.929, 'content': [{'end': 742.252, 'text': 'how you can access this?', 'start': 740.811, 'duration': 1.441}, {'end': 744.414, 'text': 'the node, the pointer to this node is tail.', 'start': 742.252, 'duration': 2.162}, {'end': 755.043, 'text': 'Now, after this line, after this line, do not write this line, you can directly write tail of next is equal to 0.', 'start': 745.114, 'duration': 9.929}, {'end': 757.005, 'text': 'so now here 0.', 'start': 755.043, 'duration': 1.962}, {'end': 758.046, 'text': 'this link has been broken.', 'start': 757.005, 'duration': 1.041}, {'end': 759.187, 'text': 'after that you can write free temp.', 'start': 758.046, 'duration': 1.141}, {'end': 763.956, 'text': 'so two ways how you can write this thing or this thing also fine.', 'start': 760.253, 'duration': 3.703}, {'end': 765.637, 'text': 'so now, suppose this is our list.', 'start': 763.956, 'duration': 1.681}, {'end': 768.939, 'text': 'we have four node in our list and i want to delete this node.', 'start': 765.637, 'duration': 3.302}, {'end': 773.202, 'text': 'the position is three, one, two and three this node.', 'start': 768.939, 'duration': 4.263}], 'summary': 'Demonstrating deletion of a node in a list of four nodes.', 'duration': 32.391, 'max_score': 740.811, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE740811.jpg'}, {'end': 829.885, 'src': 'embed', 'start': 798.184, 'weight': 1, 'content': [{'end': 801.507, 'text': 'so so i need a pointer pointing to this node.', 'start': 798.184, 'duration': 3.323}, {'end': 803.589, 'text': 'fine, so that i can free this.', 'start': 801.507, 'duration': 2.082}, {'end': 809.244, 'text': "suppose i want to delete this data and i'm have a pointer.", 'start': 803.589, 'duration': 5.655}, {'end': 811.166, 'text': 'i am having a pointer pointing to this node.', 'start': 809.244, 'duration': 1.922}, {'end': 812.347, 'text': 'that is this one.', 'start': 811.166, 'duration': 1.181}, {'end': 816.191, 'text': 'so after updating this link and this link, this, these links has been broken.', 'start': 812.347, 'duration': 3.844}, {'end': 818.113, 'text': 'fine, now i can free this node.', 'start': 816.191, 'duration': 1.922}, {'end': 820.316, 'text': 'free temp, right.', 'start': 818.113, 'duration': 2.203}, {'end': 823.799, 'text': 'so now how we can set this pointer to this node.', 'start': 820.316, 'duration': 3.483}, {'end': 829.885, 'text': 'you have to traverse the list because only we have this tail value and this head value.', 'start': 823.799, 'duration': 6.086}], 'summary': 'Discussion about updating pointers, deleting data, and freeing nodes in a linked list.', 'duration': 31.701, 'max_score': 798.184, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE798184.jpg'}, {'end': 871.093, 'src': 'embed', 'start': 842.659, 'weight': 2, 'content': [{'end': 850.284, 'text': 'i can update this cell also, and i can update this also because in the single node i have address of the next node and address of the previous node.', 'start': 842.659, 'duration': 7.625}, {'end': 854.806, 'text': 'that is why deletion is also easy in doubly linked list, because in this case we need only one pointer,', 'start': 850.284, 'duration': 4.522}, {'end': 857.307, 'text': 'but in singly linked list we need two pointers.', 'start': 854.806, 'duration': 2.501}, {'end': 859.188, 'text': 'fine, that we have already discussed.', 'start': 857.307, 'duration': 1.881}, {'end': 862.689, 'text': 'fine, you can check out that video in this i button.', 'start': 859.188, 'duration': 3.501}, {'end': 864.39, 'text': 'now see what you will do.', 'start': 862.689, 'duration': 1.701}, {'end': 871.093, 'text': 'obviously we will ask from the user from which position he wants to delete the data and to get the input we need a variable.', 'start': 864.39, 'duration': 6.703}], 'summary': 'Doubly linked list simplifies deletion with one pointer, contrasting with singly linked list, requiring two pointers.', 'duration': 28.434, 'max_score': 842.659, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE842659.jpg'}, {'end': 946.626, 'src': 'embed', 'start': 918.504, 'weight': 4, 'content': [{'end': 922.366, 'text': 'Means how many, you can count how many nodes are there? One, two, three, and four nodes.', 'start': 918.504, 'duration': 3.862}, {'end': 927.37, 'text': 'And if position is four, then you can say it is the, you want to delete from the end of the list.', 'start': 922.447, 'duration': 4.923}, {'end': 929.131, 'text': 'So you can call delete from end.', 'start': 927.39, 'duration': 1.741}, {'end': 933.975, 'text': 'Otherwise we will implement the logic to delete from a specific position.', 'start': 929.692, 'duration': 4.283}, {'end': 946.626, 'text': 'So first of all, we will ask from the user using printf and scanf enter the position, right? And after that we will traverse.', 'start': 934.095, 'duration': 12.531}], 'summary': 'Logic to delete nodes from a list based on position input, with user interaction.', 'duration': 28.122, 'max_score': 918.504, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE918504.jpg'}], 'start': 707.139, 'title': 'Managing linked list nodes', 'summary': 'Covers updating and deleting nodes in a linked list, including updating the tail pointer, breaking and re-linking nodes for deletion, and the traversal procedure for deleting data from a doubly linked list.', 'chapters': [{'end': 823.799, 'start': 707.139, 'title': 'Updating and deleting nodes in a linked list', 'summary': 'Discusses updating and deleting nodes in a linked list, highlighting the process of updating the tail pointer, breaking and re-linking nodes to delete a specified node, and the need for pointers in accessing and freeing memory.', 'duration': 116.66, 'highlights': ["The process of updating the tail pointer involves setting temp equal to tail, updating tail to its previous value, and setting tail's next pointer to 0, resulting in a broken link and freeing the temporary node.", 'In the context of deleting a specified node in a list, the chapter highlights the need to update the links before and after the node to be deleted, emphasizing the necessity of using pointers for accessing and freeing memory.']}, {'end': 933.975, 'start': 823.799, 'title': 'Deleting data from a doubly linked list', 'summary': 'Discusses the process of deleting data from a doubly linked list, explaining the traversal and deletion procedure, and the conditions for calling the delete from beginning and delete from end functions based on the position input by the user.', 'duration': 110.176, 'highlights': ['The chapter discusses the process of deleting data from a doubly linked list, explaining the traversal and deletion procedure, and the conditions for calling the delete from beginning and delete from end functions based on the position input by the user.', 'Deletion in a doubly linked list is easier compared to a singly linked list as it requires only one pointer, and the chapter emphasizes the efficiency of deletion in a doubly linked list due to the presence of the address of the next and previous nodes within a single node.', 'The chapter provides specific conditions for calling the delete from beginning and delete from end functions based on the position input by the user, demonstrating the implementation of the logic to delete from a specific position and the use of traversal and temporary pointers in the process.']}], 'duration': 226.836, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE707139.jpg', 'highlights': ["The process of updating the tail pointer involves setting temp equal to tail, updating tail to its previous value, and setting tail's next pointer to 0, resulting in a broken link and freeing the temporary node.", 'In the context of deleting a specified node in a list, the chapter highlights the need to update the links before and after the node to be deleted, emphasizing the necessity of using pointers for accessing and freeing memory.', 'The chapter discusses the process of deleting data from a doubly linked list, explaining the traversal and deletion procedure, and the conditions for calling the delete from beginning and delete from end functions based on the position input by the user.', 'Deletion in a doubly linked list is easier compared to a singly linked list as it requires only one pointer, and the chapter emphasizes the efficiency of deletion in a doubly linked list due to the presence of the address of the next and previous nodes within a single node.', 'The chapter provides specific conditions for calling the delete from beginning and delete from end functions based on the position input by the user, demonstrating the implementation of the logic to delete from a specific position and the use of traversal and temporary pointers in the process.']}, {'end': 1087.097, 'segs': [{'end': 993.842, 'src': 'embed', 'start': 962.189, 'weight': 0, 'content': [{'end': 966.65, 'text': 'Right Because we need a pointer to this position for freeing this memory.', 'start': 962.189, 'duration': 4.461}, {'end': 968.65, 'text': 'So now here what I can write.', 'start': 967.17, 'duration': 1.48}, {'end': 972.931, 'text': 'While i less than.', 'start': 970.891, 'duration': 2.04}, {'end': 977.855, 'text': 'pose till then we are going to traverse.', 'start': 974.414, 'duration': 3.441}, {'end': 982.877, 'text': 'fine. so now at starting what you will do, how you will traverse.', 'start': 977.855, 'duration': 5.022}, {'end': 985.539, 'text': 'obviously we cannot move this head.', 'start': 982.877, 'duration': 2.662}, {'end': 986.839, 'text': 'so we need a pointer.', 'start': 985.539, 'duration': 1.3}, {'end': 993.842, 'text': 'we have declared one pointer temp and we first of all set this pointer to the first node and then we are going to update this temp.', 'start': 986.839, 'duration': 7.003}], 'summary': 'Using a pointer to traverse and update temp in a code implementation.', 'duration': 31.653, 'max_score': 962.189, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE962189.jpg'}], 'start': 934.095, 'title': 'Linked list traversal and memory deallocation', 'summary': 'Covers the traversal of a linked list and memory deallocation using a pointer to free memory at a specified position. it includes an example of traversing a linked list to reach a specific position and freeing the memory at that position.', 'chapters': [{'end': 1087.097, 'start': 934.095, 'title': 'Linked list traversal and memory deallocation', 'summary': 'Covers the traversal of a linked list and memory deallocation by using a pointer to free memory at a specified position, with an example showing the process of traversing a linked list to reach a specific position and freeing the memory at that position.', 'duration': 153.002, 'highlights': ['The chapter covers the process of traversing a linked list to reach a specific position and freeing the memory at that position. Details the process of traversing a linked list to reach a specific position and freeing the memory at that position.', 'The example given illustrates the process of traversing a linked list to reach a specific position and freeing the memory at that position. Illustrates the process of traversing a linked list to reach a specific position and freeing the memory at that position.', 'The chapter explains the use of a pointer to free memory at a specified position in the linked list. Explains the use of a pointer to free memory at a specified position in the linked list.']}], 'duration': 153.002, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE934095.jpg', 'highlights': ['The chapter covers the process of traversing a linked list to reach a specific position and freeing the memory at that position.', 'The example given illustrates the process of traversing a linked list to reach a specific position and freeing the memory at that position.', 'The chapter explains the use of a pointer to free memory at a specified position in the linked list.']}, {'end': 1324.148, 'segs': [{'end': 1144.443, 'src': 'heatmap', 'start': 1087.097, 'weight': 1, 'content': [{'end': 1090.839, 'text': 'now i can update these links and after that i can free this memory.', 'start': 1087.097, 'duration': 3.742}, {'end': 1097.6, 'text': 'fine. so now, after this, while loop what you will write see, now you can access this part.', 'start': 1090.839, 'duration': 6.761}, {'end': 1101.441, 'text': 'here i want to store address of this node after deleting this.', 'start': 1097.6, 'duration': 3.841}, {'end': 1102.362, 'text': 'that is 150.', 'start': 1101.441, 'duration': 0.921}, {'end': 1105.182, 'text': 'here i want to store 150.', 'start': 1102.362, 'duration': 2.82}, {'end': 1108.783, 'text': 'right, how you can access this part, 500.', 'start': 1105.182, 'duration': 3.601}, {'end': 1111.624, 'text': 'the address of this node is 100.', 'start': 1108.783, 'duration': 2.841}, {'end': 1113.484, 'text': 'so how we can reach till this node?', 'start': 1111.624, 'duration': 1.86}, {'end': 1118.631, 'text': 'here we have 100 address of this node and we have a pointer to this node.', 'start': 1113.484, 'duration': 5.147}, {'end': 1120.011, 'text': 'that is temp.', 'start': 1118.631, 'duration': 1.38}, {'end': 1123.554, 'text': 'so how we can access this, this part, temp of previous.', 'start': 1120.011, 'duration': 3.543}, {'end': 1130.718, 'text': 'so here i can write after this while loop i can write temp, temp of previous.', 'start': 1123.554, 'duration': 7.164}, {'end': 1134.16, 'text': 'that is 100 means we have, we have reached till this node.', 'start': 1130.718, 'duration': 3.442}, {'end': 1137.703, 'text': 'but in this particular node also i want to reach till this part.', 'start': 1134.16, 'duration': 3.543}, {'end': 1144.443, 'text': 'so here i can write this part is next next is equal to now.', 'start': 1137.703, 'duration': 6.74}], 'summary': 'Updating links and freeing memory in code.', 'duration': 26.387, 'max_score': 1087.097, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE1087097.jpg'}, {'end': 1268.785, 'src': 'embed', 'start': 1240.936, 'weight': 2, 'content': [{'end': 1244.858, 'text': 'and now this is pointing to this node.', 'start': 1240.936, 'duration': 3.922}, {'end': 1248.339, 'text': 'right now we have set this link also and this link also.', 'start': 1244.858, 'duration': 3.481}, {'end': 1258.762, 'text': 'now we can free this space and how you can free this free temp, because temp is pointing to this node, means from this address,', 'start': 1248.339, 'duration': 10.423}, {'end': 1262.903, 'text': '500 from this address we are going to free this memory.', 'start': 1258.762, 'duration': 4.141}, {'end': 1264.704, 'text': "fine. so now that's it.", 'start': 1262.903, 'duration': 1.801}, {'end': 1267.344, 'text': 'that is how we can delete from any specific position.', 'start': 1264.704, 'duration': 2.64}, {'end': 1268.785, 'text': 'i hope you can modify this.', 'start': 1267.344, 'duration': 1.441}], 'summary': 'Deleting node from a specific position by freeing memory at address 500.', 'duration': 27.849, 'max_score': 1240.936, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE1240936.jpg'}, {'end': 1316.105, 'src': 'embed', 'start': 1291.855, 'weight': 0, 'content': [{'end': 1300.639, 'text': 'if position is 50, so you need to traverse 50 nodes, it means obviously it is proportional to n, the number of nodes in the list,', 'start': 1291.855, 'duration': 8.784}, {'end': 1305.101, 'text': 'and if you want to delete from middle, then you have to traverse what n by 2 nodes.', 'start': 1300.639, 'duration': 4.462}, {'end': 1309.262, 'text': 'So that is why the time complexity in average case is what?', 'start': 1306.141, 'duration': 3.121}, {'end': 1313.044, 'text': 'Order of n.', 'start': 1310.663, 'duration': 2.381}, {'end': 1316.105, 'text': 'Fine So this is all about the deletion from a doubly linked list.', 'start': 1313.044, 'duration': 3.061}], 'summary': 'Deletion from a doubly linked list has time complexity of o(n) in the average case.', 'duration': 24.25, 'max_score': 1291.855, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE1291855.jpg'}], 'start': 1087.097, 'title': 'Linked list operations', 'summary': 'Covers updating links, freeing memory, deleting nodes, and linking pointers in a linked list. it also discusses time complexity related to doubly linked list deletion, noting an average case time complexity of order n.', 'chapters': [{'end': 1166.503, 'start': 1087.097, 'title': 'Updating links and freeing memory', 'summary': 'Discusses the process of updating links and freeing memory in a node structure, involving accessing, storing, and reaching specific addresses such as 150, 500, and 100.', 'duration': 79.406, 'highlights': ['The process involves accessing and storing specific addresses, including 150, 500, and 100, within the node structure.', 'The chapter explains the method of reaching specific nodes and manipulating their pointers to free memory.', 'The detailed process involves navigating through the node structure using pointers and accessing specific memory addresses to update links and store new values.']}, {'end': 1268.785, 'start': 1166.503, 'title': 'Deleting node and linking', 'summary': 'Explains the process of deleting a node and linking the pointers in a linked list, demonstrating how to free the memory space and modify the list.', 'duration': 102.282, 'highlights': ['The process involves setting and manipulating pointers to access and modify nodes within the linked list, such as reaching specific addresses and storing new values.', "The pointer 'temp' is utilized to access the previous node and modify the links, allowing for the deletion of nodes and freeing of memory space.", 'The detailed explanation includes the specific actions taken to reach and manipulate nodes, such as storing new values and freeing memory space.', 'The chapter also emphasizes the importance of pointers in accessing and modifying nodes within the linked list, showcasing the process of deleting nodes and freeing memory space.']}, {'end': 1324.148, 'start': 1268.785, 'title': 'Doubly linked list deletion', 'summary': 'Discusses the time complexity of deleting a data from a doubly linked list, noting that it is proportional to the number of nodes in the list, with average case time complexity being of order n.', 'duration': 55.363, 'highlights': ['The time complexity for deleting a data from a doubly linked list is proportional to the number of nodes in the list, with average case time complexity being of Order n, as it requires traversing through n or n/2 nodes depending on the position of deletion.', 'The chapter also mentions the intention to cover circular linked list and its operations in the next video.']}], 'duration': 237.051, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7yNUXcOcHwE/pics/7yNUXcOcHwE1087097.jpg', 'highlights': ['The time complexity for deleting a data from a doubly linked list is proportional to the number of nodes in the list, with average case time complexity being of Order n, as it requires traversing through n or n/2 nodes depending on the position of deletion.', 'The process involves setting and manipulating pointers to access and modify nodes within the linked list, such as reaching specific addresses and storing new values.', 'The chapter explains the method of reaching specific nodes and manipulating their pointers to free memory.', 'The detailed process involves navigating through the node structure using pointers and accessing specific memory addresses to update links and store new values.', "The pointer 'temp' is utilized to access the previous node and modify the links, allowing for the deletion of nodes and freeing of memory space.", 'The chapter also emphasizes the importance of pointers in accessing and modifying nodes within the linked list, showcasing the process of deleting nodes and freeing memory space.', 'The process involves accessing and storing specific addresses, including 150, 500, and 100, within the node structure.']}], 'highlights': ['The video covers deleting data from the end and a specific position in the double linked list, providing a comprehensive guide to managing and manipulating data within the list.', 'The process of deleting nodes from the beginning is explained, involving updating the head pointer, breaking links, and freeing memory, resulting in the efficient deletion of nodes. 4 lines of code are used for the deletion process.', 'The specific steps involved in deleting a node from the end are detailed, including updating the tail pointer, breaking links, and freeing memory to complete the deletion process. The process involves updating pointers, breaking two links, and freeing memory.', 'The importance of maintaining a tail pointer for efficient deletion is highlighted, as it eliminates the need for list traversal and simplifies the process of accessing and updating pointers. The tail pointer allows for one-time traversal to delete a node.', "When detaching a node from a list in C, it is crucial to free the allocated memory to avoid leaving garbage data, which can be achieved using the free function with the pointer to the node's address.", 'The process of deleting a node from the end of a linked list is explained, involving setting a temp pointer, freeing the node, and updating the tail pointer, with a time complexity of O(1).', "The chapter emphasizes the importance of checking if the list is empty, as it impacts the subsequent operations and outputs, providing a clear understanding of the list's state.", "The process of updating the 'temp' pointer is crucial for maintaining integrity and accurate traversal within the list, ensuring efficient access and modification of nodes.", "The process of updating the tail pointer involves setting temp equal to tail, updating tail to its previous value, and setting tail's next pointer to 0, resulting in a broken link and freeing the temporary node.", 'In the context of deleting a specified node in a list, the chapter highlights the need to update the links before and after the node to be deleted, emphasizing the necessity of using pointers for accessing and freeing memory.', 'The chapter discusses the process of deleting data from a doubly linked list, explaining the traversal and deletion procedure, and the conditions for calling the delete from beginning and delete from end functions based on the position input by the user.', 'Deletion in a doubly linked list is easier compared to a singly linked list as it requires only one pointer, and the chapter emphasizes the efficiency of deletion in a doubly linked list due to the presence of the address of the next and previous nodes within a single node.', 'The chapter provides specific conditions for calling the delete from beginning and delete from end functions based on the position input by the user, demonstrating the implementation of the logic to delete from a specific position and the use of traversal and temporary pointers in the process.', 'The chapter covers the process of traversing a linked list to reach a specific position and freeing the memory at that position.', 'The example given illustrates the process of traversing a linked list to reach a specific position and freeing the memory at that position.', 'The chapter explains the use of a pointer to free memory at a specified position in the linked list.', 'The time complexity for deleting a data from a doubly linked list is proportional to the number of nodes in the list, with average case time complexity being of Order n, as it requires traversing through n or n/2 nodes depending on the position of deletion.', 'The process involves setting and manipulating pointers to access and modify nodes within the linked list, such as reaching specific addresses and storing new values.', 'The chapter explains the method of reaching specific nodes and manipulating their pointers to free memory.', 'The detailed process involves navigating through the node structure using pointers and accessing specific memory addresses to update links and store new values.', "The pointer 'temp' is utilized to access the previous node and modify the links, allowing for the deletion of nodes and freeing of memory space.", 'The chapter also emphasizes the importance of pointers in accessing and modifying nodes within the linked list, showcasing the process of deleting nodes and freeing memory space.']}