title
2.13 Reverse a Doubly Linked List | Data Structures & Algorithm Tutorials

description
In this video I have written a C program to Reverse a Doubly Linked List as well as I have discussed how to reverse a DLL with example. 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.13 Reverse a Doubly Linked List | Data Structures & Algorithm Tutorials', 'heatmap': [{'end': 223.794, 'start': 210.107, 'weight': 0.708}, {'end': 505.346, 'start': 477.229, 'weight': 0.72}, {'end': 600.132, 'start': 586.426, 'weight': 0.76}, {'end': 1053.595, 'start': 996.699, 'weight': 0.864}, {'end': 1127.919, 'start': 1085.049, 'weight': 0.72}], 'summary': 'Tutorial covers the reversal of doubly linked lists, focusing on the process of reversing links, updating pointers, and implementing node reversal and swapping values, as well as explaining the iterative steps for achieving a reversed linked list and demonstrating the result of reversing a doubly linked list with head and tail data as 7 and 6.', 'chapters': [{'end': 514.45, 'segs': [{'end': 46.628, 'src': 'embed', 'start': 0.189, 'weight': 0, 'content': [{'end': 4.07, 'text': 'and we have discussed how to reverse a singly linked list.', 'start': 0.189, 'duration': 3.881}, {'end': 6.072, 'text': 'to check out those videos.', 'start': 4.07, 'duration': 2.002}, {'end': 8.433, 'text': "i'll provide you the link in the description box.", 'start': 6.072, 'duration': 2.361}, {'end': 13.275, 'text': 'you can check out there the complete series on linked list in data structure.', 'start': 8.433, 'duration': 4.842}, {'end': 15.276, 'text': 'fine, you can check out in the description box.', 'start': 13.275, 'duration': 2.001}, {'end': 17.117, 'text': 'so now this is a doubly linked list.', 'start': 15.276, 'duration': 1.841}, {'end': 21.279, 'text': 'it is having four nodes and i want to reverse this doubly linked list.', 'start': 17.117, 'duration': 4.162}, {'end': 24.44, 'text': "see, i don't want to swap the nodes.", 'start': 21.279, 'duration': 3.161}, {'end': 29.682, 'text': 'like this, this node and with this nodes, seven would go here and six would go there.', 'start': 24.44, 'duration': 5.242}, {'end': 32.083, 'text': "like this, i i'm not going to swap the nodes.", 'start': 29.682, 'duration': 2.401}, {'end': 37.084, 'text': "what i'm going to do is i'll just reverse these links.", 'start': 32.083, 'duration': 5.001}, {'end': 43.106, 'text': 'fine, that, uh, processor, we have already discussed in singly linked list how to reverse a singly linked list.', 'start': 37.084, 'duration': 6.022}, {'end': 46.628, 'text': 'fine, so now how you will reverse these links.', 'start': 43.106, 'duration': 3.522}], 'summary': 'Discussion on reversing a doubly linked list, involving four nodes without swapping, by reversing the links.', 'duration': 46.439, 'max_score': 0.189, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_6JI9XdO8nM/pics/_6JI9XdO8nM189.jpg'}, {'end': 129.021, 'src': 'embed', 'start': 100.225, 'weight': 3, 'content': [{'end': 105.592, 'text': 'and see this previous pointer of this node is containing address of the previous node.', 'start': 100.225, 'duration': 5.367}, {'end': 106.252, 'text': 'no previous node.', 'start': 105.592, 'duration': 0.66}, {'end': 107.934, 'text': 'that is why it is containing null.', 'start': 106.252, 'duration': 1.682}, {'end': 116.605, 'text': 'but after reversing what i want, this previous pointer will contain address of the next node, that is 150.', 'start': 107.934, 'duration': 8.671}, {'end': 120.74, 'text': 'so here there should be 150.', 'start': 116.605, 'duration': 4.135}, {'end': 123.361, 'text': 'this is what reversing means.', 'start': 120.74, 'duration': 2.621}, {'end': 129.021, 'text': 'swap these values, fine, and finally swap this.', 'start': 123.361, 'duration': 5.66}], 'summary': 'Reversing the node to contain address of next node, making previous pointer 150.', 'duration': 28.796, 'max_score': 100.225, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_6JI9XdO8nM/pics/_6JI9XdO8nM100225.jpg'}, {'end': 181.816, 'src': 'embed', 'start': 146.385, 'weight': 4, 'content': [{'end': 157.151, 'text': 'that is, i want here what 500 the next pointer should contain after reversing the address of the this this previous node, that is 200.', 'start': 146.385, 'duration': 10.766}, {'end': 163.952, 'text': 'so here 200, right, this is what the reversing means.', 'start': 157.151, 'duration': 6.801}, {'end': 165.953, 'text': 'this is what i will implement.', 'start': 163.952, 'duration': 2.001}, {'end': 168.653, 'text': 'fine. so simply what what we are doing?', 'start': 165.953, 'duration': 2.7}, {'end': 173.734, 'text': 'we are swapping these values 200 here, 500 here, 0 here, 150 here, this 150 here and this 400 here.', 'start': 168.653, 'duration': 5.081}, {'end': 181.816, 'text': 'this is what we will do here.', 'start': 179.795, 'duration': 2.021}], 'summary': 'Reversing the address swaps 200 with 500, 0 with 150, and 150 with 400.', 'duration': 35.431, 'max_score': 146.385, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_6JI9XdO8nM/pics/_6JI9XdO8nM146385.jpg'}, {'end': 236.36, 'src': 'heatmap', 'start': 210.107, 'weight': 0.708, 'content': [{'end': 214.889, 'text': 'suppose here i write how we can access this part.', 'start': 210.107, 'duration': 4.782}, {'end': 218.931, 'text': 'temp of next is equal to here.', 'start': 214.889, 'duration': 4.042}, {'end': 221.492, 'text': 'i want to store what i want to swap these values.', 'start': 218.931, 'duration': 2.561}, {'end': 223.794, 'text': 'so this value 0 i want to store here.', 'start': 221.492, 'duration': 2.302}, {'end': 231.137, 'text': 'so how we can write temp of previous means the temp of previous value 0 now would be stored here rather than 150.', 'start': 223.794, 'duration': 7.343}, {'end': 236.36, 'text': 'fine. now it means this link has been broken.', 'start': 231.137, 'duration': 5.223}], 'summary': 'Storing previous value 0 instead of 150 breaks the link.', 'duration': 26.253, 'max_score': 210.107, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_6JI9XdO8nM/pics/_6JI9XdO8nM210107.jpg'}, {'end': 452.383, 'src': 'embed', 'start': 422.345, 'weight': 7, 'content': [{'end': 423.585, 'text': 'three parts are there.', 'start': 422.345, 'duration': 1.24}, {'end': 427.006, 'text': 'one is data part and two are next and previous pointers right.', 'start': 423.585, 'duration': 3.421}, {'end': 431.127, 'text': 'and we have already, we have declared here two pointers, that is head and tail.', 'start': 427.006, 'duration': 4.121}, {'end': 435.87, 'text': 'so here i can write asterisk head, asterisk tail.', 'start': 431.647, 'duration': 4.223}, {'end': 442.035, 'text': "or if you don't write here, simply you can do semicolon here and after that, here you can write this data type struct node,", 'start': 435.87, 'duration': 6.165}, {'end': 444.357, 'text': 'asterisk head and asterisk tail.', 'start': 442.035, 'duration': 2.322}, {'end': 452.383, 'text': 'fine, after that you can call that function, create dll that we have already discussed and you create this doubly linked list,', 'start': 444.357, 'duration': 8.026}], 'summary': 'The transcript discusses declaring pointers for a doubly linked list and calling the function to create it.', 'duration': 30.038, 'max_score': 422.345, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_6JI9XdO8nM/pics/_6JI9XdO8nM422345.jpg'}, {'end': 505.346, 'src': 'heatmap', 'start': 468.593, 'weight': 6, 'content': [{'end': 477.229, 'text': 'for reversing these links we need two extra pointers, right so here we will declare these two pointers and how to declare.', 'start': 468.593, 'duration': 8.636}, {'end': 484.333, 'text': 'i think the syntax you already know, because we have already discussed the syntax many times in the previous videos.', 'start': 477.229, 'duration': 7.104}, {'end': 487.636, 'text': 'right so now i have these two nodes.', 'start': 484.333, 'duration': 3.303}, {'end': 490.378, 'text': 'sorry, these two pointers, current and next.', 'start': 487.636, 'duration': 2.742}, {'end': 493.94, 'text': 'fine, now see, if you can write down a condition.', 'start': 490.378, 'duration': 3.562}, {'end': 496.302, 'text': 'if head is equal to, is equal to null.', 'start': 493.94, 'duration': 2.362}, {'end': 498.563, 'text': 'it means there is no node in the list.', 'start': 496.302, 'duration': 2.261}, {'end': 499.284, 'text': 'list is empty.', 'start': 498.563, 'duration': 0.721}, {'end': 503.866, 'text': 'so we cannot reverse this list else in else part what you will write.', 'start': 499.284, 'duration': 4.582}, {'end': 505.346, 'text': 'i am writing that thing only.', 'start': 503.866, 'duration': 1.48}], 'summary': 'Declaring two pointers for reversing links and writing conditions for handling empty list.', 'duration': 25.347, 'max_score': 468.593, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_6JI9XdO8nM/pics/_6JI9XdO8nM468593.jpg'}], 'start': 0.189, 'title': 'Reversing doubly linked list', 'summary': 'Explains the process of reversing a doubly linked list by focusing on reversal of links, updating next and previous pointers. it also delves into the implementation of node reversal, swapping values, and addressing empty list conditions.', 'chapters': [{'end': 146.385, 'start': 0.189, 'title': 'Reversing doubly linked list', 'summary': 'Explains the process of reversing a doubly linked list, emphasizing the reversal of links instead of node swapping, and how the next and previous pointers are updated after reversal.', 'duration': 146.196, 'highlights': ['The chapter emphasizes reversing the links in a doubly linked list instead of swapping the nodes, and explains the process of updating the next and previous pointers after reversal.', 'The process of reversing a doubly linked list is described, focusing on updating the next and previous pointers of each node to reverse the list.', 'The concept of reversing a doubly linked list is explained, highlighting the update of next and previous pointers to achieve the reversal.']}, {'end': 321.765, 'start': 146.385, 'title': 'Node reversal implementation', 'summary': 'Discussed the implementation of reversing the address of the previous node, swapping values 200 and 500, and updating pointers to achieve the reversal in a linked list.', 'duration': 175.38, 'highlights': ['We are swapping these values 200 here, 500 here, 0 here, 150 here, and 400 here, as part of the node reversal implementation.', 'The chapter discussed the process of updating pointers and swapping values to reverse the address of the previous node in a linked list.', 'Explanation of how to update pointers and values to reverse the address of the previous node was provided.', 'The chapter emphasized the significance of updating pointers and values to achieve the reversal in a linked list.']}, {'end': 514.45, 'start': 321.765, 'title': 'Doubly linked list reversal', 'summary': 'Discusses the process of reversing a doubly linked list, emphasizing the need for additional pointers and the conditions for an empty list, using a custom data type with three parts: data, and previous and next pointers.', 'duration': 192.685, 'highlights': ['The chapter discusses the process of reversing a doubly linked list. The transcript details the process of reversing a doubly linked list.', 'The need for additional pointers and the conditions for an empty list are emphasized. The speaker emphasizes the need for additional pointers and discusses the condition for an empty list.', 'The custom data type with three parts: data, and previous and next pointers is mentioned. The transcript mentions the custom data type with three parts: data, and previous and next pointers.']}], 'duration': 514.261, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_6JI9XdO8nM/pics/_6JI9XdO8nM189.jpg', 'highlights': ['The chapter emphasizes reversing the links in a doubly linked list instead of swapping the nodes, and explains the process of updating the next and previous pointers after reversal.', 'The process of reversing a doubly linked list is described, focusing on updating the next and previous pointers of each node to reverse the list.', 'The concept of reversing a doubly linked list is explained, highlighting the update of next and previous pointers to achieve the reversal.', 'The chapter discussed the process of updating pointers and swapping values to reverse the address of the previous node in a linked list.', 'The chapter emphasized the significance of updating pointers and values to achieve the reversal in a linked list.', 'The chapter discusses the process of reversing a doubly linked list. The transcript details the process of reversing a doubly linked list.', 'The need for additional pointers and the conditions for an empty list are emphasized. The speaker emphasizes the need for additional pointers and discusses the condition for an empty list.', 'The custom data type with three parts: data, and previous and next pointers is mentioned. The transcript mentions the custom data type with three parts: data, and previous and next pointers.']}, {'end': 743.022, 'segs': [{'end': 567.237, 'src': 'embed', 'start': 514.45, 'weight': 1, 'content': [{'end': 519.292, 'text': 'fine, the first step is, we are going to point this current here.', 'start': 514.45, 'duration': 4.842}, {'end': 521.652, 'text': 'so here what i want to store, that is 200.', 'start': 519.292, 'duration': 2.36}, {'end': 526.354, 'text': 'so now, from where i can get this 200 head is containing 200.', 'start': 521.652, 'duration': 4.702}, {'end': 534.31, 'text': 'so here, after this, what i can write, this current is equal to head.', 'start': 526.354, 'duration': 7.956}, {'end': 542.403, 'text': "right now this is pointing to this node only and before updating, before reversing, before swapping these values, i'll maintain,", 'start': 534.31, 'duration': 8.093}, {'end': 551.504, 'text': "i'll set a pointer to this node also so that if we lose this, if we break this link, we can easily get this address.", 'start': 542.403, 'duration': 9.101}, {'end': 555.527, 'text': 'fine for updating these values, for reverse, for swapping these values.', 'start': 551.504, 'duration': 4.023}, {'end': 560.811, 'text': 'so here, here i will write what this next node is equal to.', 'start': 555.527, 'duration': 5.284}, {'end': 565.375, 'text': 'here i want to store 150 from where i can get 150.', 'start': 560.811, 'duration': 4.564}, {'end': 567.237, 'text': 'here the pointer to this long.', 'start': 565.375, 'duration': 1.862}], 'summary': 'Storing 200 and 150, maintaining pointers for updating and reversing.', 'duration': 52.787, 'max_score': 514.45, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_6JI9XdO8nM/pics/_6JI9XdO8nM514450.jpg'}, {'end': 625.195, 'src': 'heatmap', 'start': 586.426, 'weight': 3, 'content': [{'end': 589.707, 'text': 'so now what you will write, see how you can access this part.', 'start': 586.426, 'duration': 3.281}, {'end': 591.408, 'text': 'current of next.', 'start': 589.707, 'duration': 1.701}, {'end': 596.65, 'text': 'so here i will write current of next is equal to here.', 'start': 591.408, 'duration': 5.242}, {'end': 600.132, 'text': 'i want to store whatever the value here in this pointer.', 'start': 596.65, 'duration': 3.482}, {'end': 602.833, 'text': 'how we can access this pointer current, previous.', 'start': 600.132, 'duration': 2.701}, {'end': 607.611, 'text': 'so here i will write current previous.', 'start': 602.833, 'duration': 4.778}, {'end': 617.74, 'text': 'so now we have updated this link and we have here 0 because the in current previous we have value 0 and that would be stored here in the current next.', 'start': 607.611, 'duration': 10.129}, {'end': 618.701, 'text': 'so now there is no.', 'start': 617.74, 'duration': 0.961}, {'end': 622.653, 'text': 'this link is no more now right.', 'start': 620.171, 'duration': 2.482}, {'end': 625.195, 'text': 'and now here i want to store what 150.', 'start': 622.653, 'duration': 2.542}], 'summary': 'Updating link values, storing 150.', 'duration': 28.545, 'max_score': 586.426, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_6JI9XdO8nM/pics/_6JI9XdO8nM586426.jpg'}, {'end': 743.022, 'src': 'embed', 'start': 694.124, 'weight': 0, 'content': [{'end': 698.647, 'text': 'this pointer now this pointer is also pointing to this node.', 'start': 694.124, 'duration': 4.523}, {'end': 701.539, 'text': 'now the current node is this one.', 'start': 699.958, 'duration': 1.581}, {'end': 703.62, 'text': 'now i want to swap these values.', 'start': 701.539, 'duration': 2.081}, {'end': 705.48, 'text': 'see this previous pointer.', 'start': 703.62, 'duration': 1.86}, {'end': 707.181, 'text': 'this previous pointer is pointing to this node.', 'start': 705.48, 'duration': 1.701}, {'end': 712.163, 'text': 'but i want this pointer should, after reversing this pointer should point to the next node.', 'start': 707.181, 'duration': 4.982}, {'end': 714.824, 'text': 'that is why i want to reverse this link, this link.', 'start': 712.163, 'duration': 2.661}, {'end': 718.186, 'text': 'i want to break this link and i want that here i.', 'start': 714.824, 'duration': 3.362}, {'end': 724.488, 'text': 'i will store 500 right, this value and here this this pointer is containing address of the next node.', 'start': 718.186, 'duration': 6.302}, {'end': 729.772, 'text': 'but i want this uh pointer should contain address of the previous node, that is 200.', 'start': 724.488, 'duration': 5.284}, {'end': 732.894, 'text': 'so here i want to swap these links now.', 'start': 729.772, 'duration': 3.122}, {'end': 736.517, 'text': 'so we will repeat the same step, right.', 'start': 732.894, 'duration': 3.623}, {'end': 743.022, 'text': "so these steps i'll write in a while loop till we reach here right.", 'start': 736.517, 'duration': 6.505}], 'summary': 'Reverse and swap pointers in a linked list to store new values and addresses.', 'duration': 48.898, 'max_score': 694.124, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_6JI9XdO8nM/pics/_6JI9XdO8nM694124.jpg'}], 'start': 514.45, 'title': 'Reversing linked list', 'summary': 'Explains the process of reversing a linked list using pointer manipulation and node reassignment, achieving the desired outcome of a reversed linked list through specific examples and iterative steps.', 'chapters': [{'end': 625.195, 'start': 514.45, 'title': 'Linked list node manipulation', 'summary': 'Discusses the process of updating, reversing, and swapping values in a linked list, with a focus on pointers and specific values, such as setting a current node to 200 and swapping it with 150.', 'duration': 110.745, 'highlights': ['The process involves pointing the current node to store a value of 200 and setting a pointer to maintain the address of the node before updating, reversing, or swapping values, emphasizing the use of the current node and pointers for manipulation.', "The next step includes storing 150 and swapping the values using pointers, specifically accessing the current node's next and previous values to update the link and store 150, resulting in the removal of the previous link.", "The detailed process involves specific steps such as pointing the current node to store values, setting a pointer to maintain the node's address, and using pointers to access and update values for manipulation."]}, {'end': 694.124, 'start': 625.195, 'title': 'Reversing linked list', 'summary': 'Demonstrates the process of reversing a linked list, involving the manipulation of pointers and nodes, resulting in the reversal of the links and the successful reassignment of values, ultimately achieving the desired outcome of a reversed linked list.', 'duration': 68.929, 'highlights': ['The process involves manipulating pointers to reverse the links in the linked list, ensuring that the previous link contains the address of the next, resulting in the successful reversal of the links.', 'Reassigning the values and pointers in the linked list facilitates the reversal, with the demonstration of pointers pointing to the correct nodes and the successful manipulation of the current and next nodes.']}, {'end': 743.022, 'start': 694.124, 'title': 'Reversing linked list', 'summary': 'Discusses the process of reversing a linked list through steps of swapping pointers and values, with a focus on the example of swapping the pointers for a specific node and loop iteration until a designated point is reached.', 'duration': 48.898, 'highlights': ['The process of reversing a linked list involves swapping pointers and values, with a focus on the example of swapping the pointers for a specific node. The speaker explains the process of swapping pointers and values for a specific node in the linked list to achieve the reversal.', 'Loop iteration is utilized to repeat the steps until a designated point is reached in the linked list. The speaker mentions the use of a while loop to repeat the steps until a specific point in the linked list is reached.']}], 'duration': 228.572, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_6JI9XdO8nM/pics/_6JI9XdO8nM514450.jpg', 'highlights': ['The process involves manipulating pointers to reverse the links in the linked list, ensuring that the previous link contains the address of the next, resulting in the successful reversal of the links.', 'The process involves pointing the current node to store a value of 200 and setting a pointer to maintain the address of the node before updating, reversing, or swapping values, emphasizing the use of the current node and pointers for manipulation.', 'Reassigning the values and pointers in the linked list facilitates the reversal, with the demonstration of pointers pointing to the correct nodes and the successful manipulation of the current and next nodes.', "The next step includes storing 150 and swapping the values using pointers, specifically accessing the current node's next and previous values to update the link and store 150, resulting in the removal of the previous link.", "The detailed process involves specific steps such as pointing the current node to store values, setting a pointer to maintain the node's address, and using pointers to access and update values for manipulation.", 'The process of reversing a linked list involves swapping pointers and values, with a focus on the example of swapping the pointers for a specific node. The speaker explains the process of swapping pointers and values for a specific node in the linked list to achieve the reversal.', 'Loop iteration is utilized to repeat the steps until a designated point is reached in the linked list. The speaker mentions the use of a while loop to repeat the steps until a specific point in the linked list is reached.']}, {'end': 1173.446, 'segs': [{'end': 770.721, 'src': 'embed', 'start': 743.022, 'weight': 4, 'content': [{'end': 758.814, 'text': 'so now here i will write before the these line after this line while, and you will write what this current pointer not equal to null.', 'start': 743.022, 'duration': 15.792}, {'end': 761.115, 'text': 'till then we are going to repeat these four steps.', 'start': 758.814, 'duration': 2.301}, {'end': 766.479, 'text': 'please do not write this step in while loop, because again we will enter into while loop.', 'start': 761.115, 'duration': 5.364}, {'end': 768.42, 'text': 'then again current would be head.', 'start': 766.479, 'duration': 1.941}, {'end': 770.721, 'text': 'so again current would point to this node.', 'start': 768.42, 'duration': 2.301}], 'summary': 'The process involves repeating four steps until the current pointer is not null.', 'duration': 27.699, 'max_score': 743.022, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_6JI9XdO8nM/pics/_6JI9XdO8nM743022.jpg'}, {'end': 1053.595, 'src': 'heatmap', 'start': 965.079, 'weight': 1, 'content': [{'end': 969.542, 'text': 'in current we have 0, because current is equal to next node.', 'start': 965.079, 'duration': 4.463}, {'end': 970.923, 'text': 'next node we have 0.', 'start': 969.542, 'duration': 1.381}, {'end': 972.945, 'text': 'so now current is also not pointing to this node.', 'start': 970.923, 'duration': 2.022}, {'end': 975.566, 'text': 'now again, 0, not equal to 0.', 'start': 973.905, 'duration': 1.661}, {'end': 977.267, 'text': 'but this condition is not true, right.', 'start': 975.566, 'duration': 1.701}, {'end': 978.528, 'text': 'so we will not enter into this loop.', 'start': 977.267, 'duration': 1.261}, {'end': 979.648, 'text': 'and we are done.', 'start': 978.528, 'duration': 1.12}, {'end': 984.491, 'text': 'we have reversed these links, but now still we have something left.', 'start': 979.648, 'duration': 4.843}, {'end': 986.993, 'text': 'we have to swap these pointers.', 'start': 984.491, 'duration': 2.502}, {'end': 991.155, 'text': 'also. head would be here and tail would be here.', 'start': 986.993, 'duration': 4.162}, {'end': 994.297, 'text': 'after that, reverse operation would be completed.', 'start': 991.155, 'duration': 3.142}, {'end': 996.699, 'text': 'now how you are going to swap these things.', 'start': 994.297, 'duration': 2.402}, {'end': 999.971, 'text': 'see how you can swap two variables.', 'start': 996.699, 'duration': 3.272}, {'end': 1001.372, 'text': 'i guess you know easily.', 'start': 999.971, 'duration': 1.401}, {'end': 1004.653, 'text': 'after taking third variable you can swap these values right.', 'start': 1001.372, 'duration': 3.281}, {'end': 1007.915, 'text': 'so now obviously we have two extra pointers current and next node.', 'start': 1004.653, 'duration': 3.262}, {'end': 1009.115, 'text': 'so we can use these pointers.', 'start': 1007.915, 'duration': 1.2}, {'end': 1010.356, 'text': 'so first of all, what you will do.', 'start': 1009.115, 'duration': 1.241}, {'end': 1011.297, 'text': 'you can do what.', 'start': 1010.356, 'duration': 0.941}, {'end': 1013.358, 'text': 'in current we will store head value.', 'start': 1011.297, 'duration': 2.061}, {'end': 1020.021, 'text': 'so after this, while loop, after this closing, you will write what current is equal to head.', 'start': 1013.358, 'duration': 6.663}, {'end': 1023.707, 'text': 'it means in current we have now this 200.', 'start': 1020.021, 'duration': 3.686}, {'end': 1028.372, 'text': 'so it means current is pointing to this node right now i can update this value.', 'start': 1023.707, 'duration': 4.665}, {'end': 1033.017, 'text': 'now i can write head is equal to tail.', 'start': 1028.372, 'duration': 4.645}, {'end': 1036.781, 'text': 'it means head is containing now 400.', 'start': 1033.017, 'duration': 3.764}, {'end': 1039.564, 'text': 'so now head is pointing to this node.', 'start': 1036.781, 'duration': 2.783}, {'end': 1041.026, 'text': 'address is this one.', 'start': 1039.564, 'duration': 1.462}, {'end': 1053.595, 'text': 'so now here this is now head right and in tail we should store this 200 right and from where I can get 200 in current we have 200..', 'start': 1041.026, 'duration': 12.569}], 'summary': 'Reversed links and swapped pointers, with head at 400 and tail at 200.', 'duration': 44.036, 'max_score': 965.079, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_6JI9XdO8nM/pics/_6JI9XdO8nM965079.jpg'}, {'end': 1127.919, 'src': 'heatmap', 'start': 1064.011, 'weight': 0, 'content': [{'end': 1074.34, 'text': 'right now this is done and if you want to check that this is done or not, so before these line, before reversing this head and tail,', 'start': 1064.011, 'duration': 10.329}, {'end': 1080.685, 'text': 'before these lines, you can print what the data head of data.', 'start': 1074.34, 'duration': 6.345}, {'end': 1085.049, 'text': 'so it should print six and the tail arrow data.', 'start': 1080.685, 'duration': 4.364}, {'end': 1093.735, 'text': 'it should print seven right and after these line, after reversing head and tail, it means head is equal to here now and tail is here now.', 'start': 1085.049, 'duration': 8.686}, {'end': 1108.598, 'text': 'so after these line, if you print print %d and if you write head arrow data, then it should print 7 after reversing and printf %d tail arrow data,', 'start': 1093.735, 'duration': 14.863}, {'end': 1112.239, 'text': 'then it should print 6 before reversing.', 'start': 1108.598, 'duration': 3.641}, {'end': 1115.768, 'text': 'Head data is 6, tail data is 7..', 'start': 1113.427, 'duration': 2.341}, {'end': 1122.733, 'text': 'After reversing these lines, head data is 7 and tail data is 6.', 'start': 1115.768, 'duration': 6.965}, {'end': 1126.215, 'text': 'So, this was the iterative approach to reverse the doubly linked list.', 'start': 1122.733, 'duration': 3.482}, {'end': 1127.919, 'text': 'using recursion.', 'start': 1127.199, 'duration': 0.72}], 'summary': 'The iterative approach reversed the doubly linked list, resulting in head data 7 and tail data 6.', 'duration': 63.908, 'max_score': 1064.011, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_6JI9XdO8nM/pics/_6JI9XdO8nM1064011.jpg'}], 'start': 743.022, 'title': 'Iterating and reversing linked lists', 'summary': 'Explains iterating through nodes in a linked list, avoiding repetitions, and demonstrates reversing a doubly linked list resulting in head and tail data as 7 and 6 after the process.', 'chapters': [{'end': 790.957, 'start': 743.022, 'title': 'Iterating through nodes in a linked list', 'summary': 'Explains the process of iterating through nodes in a linked list and emphasizes avoiding unnecessary repetitions while iterating, illustrated with an example using specific node values and loop conditions.', 'duration': 47.935, 'highlights': ['The chapter emphasizes not repeating unnecessary steps while iterating through a linked list, demonstrating the avoidance of re-entering while loops and reassigning the current pointer to the head node, with the specific example of not revisiting the nodes already processed.', 'The chapter highlights the importance of moving to the next node in the iteration process, using the specific example of advancing to the next node with a value of 150 after completing an iteration.']}, {'end': 1173.446, 'start': 790.957, 'title': 'Reversing doubly linked list', 'summary': 'Demonstrates the iterative approach to reverse a doubly linked list, swapping values and pointers while updating head and tail, resulting in 7 and 6 as the head and tail data after reversing.', 'duration': 382.489, 'highlights': ['The iterative approach to reverse a doubly linked list involves updating pointers and swapping values, resulting in 7 and 6 as the head and tail data after reversing.', 'The process involves updating pointers and swapping values to reverse the linked list iteratively.', 'The demonstration includes updating head and tail pointers after swapping values to reverse the doubly linked list.', 'The process results in the head and tail data being updated to 7 and 6, respectively, after the reversing operation.', 'The chapter also mentions the ability to reverse the list using recursion and provides an example of the expected output before and after reversing.']}], 'duration': 430.424, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/_6JI9XdO8nM/pics/_6JI9XdO8nM743022.jpg', 'highlights': ['The iterative approach to reverse a doubly linked list involves updating pointers and swapping values, resulting in 7 and 6 as the head and tail data after reversing.', 'The process involves updating pointers and swapping values to reverse the linked list iteratively.', 'The demonstration includes updating head and tail pointers after swapping values to reverse the doubly linked list.', 'The process results in the head and tail data being updated to 7 and 6, respectively, after the reversing operation.', 'The chapter emphasizes not repeating unnecessary steps while iterating through a linked list, demonstrating the avoidance of re-entering while loops and reassigning the current pointer to the head node, with the specific example of not revisiting the nodes already processed.']}], 'highlights': ['The iterative approach to reverse a doubly linked list involves updating pointers and swapping values, resulting in 7 and 6 as the head and tail data after reversing.', 'The process involves updating pointers and swapping values to reverse the linked list iteratively.', 'The demonstration includes updating head and tail pointers after swapping values to reverse the doubly linked list.', 'The process results in the head and tail data being updated to 7 and 6, respectively, after the reversing operation.', 'The chapter emphasizes not repeating unnecessary steps while iterating through a linked list, demonstrating the avoidance of re-entering while loops and reassigning the current pointer to the head node, with the specific example of not revisiting the nodes already processed.', 'The process involves manipulating pointers to reverse the links in the linked list, ensuring that the previous link contains the address of the next, resulting in the successful reversal of the links.', 'The process involves pointing the current node to store a value of 200 and setting a pointer to maintain the address of the node before updating, reversing, or swapping values, emphasizing the use of the current node and pointers for manipulation.', 'Reassigning the values and pointers in the linked list facilitates the reversal, with the demonstration of pointers pointing to the correct nodes and the successful manipulation of the current and next nodes.', "The next step includes storing 150 and swapping the values using pointers, specifically accessing the current node's next and previous values to update the link and store 150, resulting in the removal of the previous link.", "The detailed process involves specific steps such as pointing the current node to store values, setting a pointer to maintain the node's address, and using pointers to access and update values for manipulation.", 'The process of reversing a linked list involves swapping pointers and values, with a focus on the example of swapping the pointers for a specific node. The speaker explains the process of swapping pointers and values for a specific node in the linked list to achieve the reversal.', 'Loop iteration is utilized to repeat the steps until a designated point is reached in the linked list. The speaker mentions the use of a while loop to repeat the steps until a specific point in the linked list is reached.', 'The chapter emphasizes reversing the links in a doubly linked list instead of swapping the nodes, and explains the process of updating the next and previous pointers after reversal.', 'The process of reversing a doubly linked list is described, focusing on updating the next and previous pointers of each node to reverse the list.', 'The concept of reversing a doubly linked list is explained, highlighting the update of next and previous pointers to achieve the reversal.', 'The chapter discussed the process of updating pointers and swapping values to reverse the address of the previous node in a linked list.', 'The chapter emphasized the significance of updating pointers and values to achieve the reversal in a linked list.', 'The chapter discusses the process of reversing a doubly linked list. The transcript details the process of reversing a doubly linked list.', 'The need for additional pointers and the conditions for an empty list are emphasized. The speaker emphasizes the need for additional pointers and discusses the condition for an empty list.', 'The custom data type with three parts: data, and previous and next pointers is mentioned. The transcript mentions the custom data type with three parts: data, and previous and next pointers.']}