 In data structure, today we will see the topic, how to delete a node from the doubly linked list. I am Dr. R. V. R. Kiddhi from Computer Science and Engineering Department of Topographic Sholopor. The learning objective or the learning outcome of today's video is, student will be able to explain the operation of deletion of the first node from the doubly linked list. Let us see the definition of a linked list. A linked list is a linear data structure in which the elements are not stored at contiguous memory location, whereas in array the memory locations are contiguous. It is data structure consisting of collection of nodes which together represent a sequence. The elements in a linked list are linked using pointers as shown in the below image. This is an example of a linked list. Each nodes are connected by a pointer. A node is an element in a linked list. A node consists of three parts in the doubly linked list. The first part is called as the data part. It contains information. The second one is called as the address part, which is pointing to the next node of the next node, which is holding the address of the next node. Then the address part, which is called as a previous pointer, which is pointing to the previous node in the list. This is how the example. This is the data part. This is a pointer, previous pointer, which is holding the address of the previous node. This part is called as a pointer part or address part, which holds the address of the next node in the list. This is what the representation of nodes in a doubly linked list. The operations, various operations in a doubly linked list. There are different operations that can be performed on a linked list. Determine if the list is empty, then we have to insert an element in the list. Deletion of an element from the list, then searching a particular element in the list, and displaying the element in the list. These are the various operations that are carried out in a doubly linked list. In deletion, deletion of nodes means removing the element of a list from the linked list. This process involves two steps. The first step is that finding the element to be deleted. Then the second step is deleting the node with the pointer adjustments. The node to be deleted can be at the following position in the list. The first node of a linked list can be removed. The last node can be removed or a specific location can be removed. In this video, we will focus on the node which is placed in the first location. First of all, check whether the list is empty or not. If it is empty, we have to display that there are no nodes, so deletion is not possible in the linked list. If the current linked list is empty, no node cannot be deleted from the list. This is the list where the list contains the value 10, 20, 30, and the last node. The next pointer is assigned to null. The first node, we have to remove this first node. Let us see what is the process. This list contains the previous pointer of the node 1, that is assigned to null, because there are no nodes before this particular node. This node is connected to the second node with these two pointers. This part is called the next pointer. This part is called the second node's previous pointer, which is holding the address of this first node's address. This particular node, the second node, is holding the address of the third node by this particular pointer, that is the next pointer. The head is nothing but the address of the first node in the list. First of all, we need to copy the head node in some temporary node. We have to store the value or store the address of this particular node in temporary node, so that we need to declare a temporary pointer. The second part is to make a second node after removing this particular node. The head should be assigned to the second node in the next step. Then we have to free the address of this particular node. The first node is removed. Make the second node as a new node. The address of the second node is assigned to the head node. This will become the first node of the list. It contains two nodes. The first node is removed, that is over here. We need to free this particular address. Make the previous pointer of the head node. This was already holding this particular part, that is 20 node number 2. The pointer of this previous pointer was holding the address of the first node. Now we have to make this as a null. The second step is that the value of this particular second node should be assigned to the head node. Then delete the temporary pointer. This is a temporary pointer that can be deleted by freeing the bracket temp. Temp is a pointer so that it will remove or it will free the locations from the memory. Now this is the code for the first node from the list. This is a function, struct node. A temporary pointer is declared. This struct node is nothing but having three parts. The first part is the previous pointer. The second part is the data part. The third part is the next pointer. For that we have declared a temporary pointer for that particular node. Initially we are assigning the value or the address of the first node to the temp pointer. Then what we are making? We are shifting head next. Head next is equal to head. Then head previous we are making as a null. That is the previous pointer of the head is made null. Then we are making after removing the first node of the list the pointer is made free with the function called freeing. And the answer is this question. How many address parts does a node in a w linked list? Take a pause and give the answer. Then the answer is the options are a is equal to 1, b is equal to 2, c is equal to 3, and d is equal to 3. How many address parts does a node in a w linked list? Whether it is two address parts, one address part or three address parts that we have to identify. The address is two. Why two? Because the node contains in the first slide, I have shown that a node contains of three parts. The first part is called as a previous, that is address part. And the middle part is called as a data part where the information or data can be stored. And in the next part is called as again address part which is holding the address of the next node. And the first part which is holding the address of the first node. So that there will be two address parts and one data part will be there in a w linked list. In a single linked list, it has only one address part. It has only one address part and one data part. That is the difference between w linked list node and single linked list node. So these are the two parts that is address part which is holding the address of previous node and this is address part which is holding the address of the next node. So the answer is two. The references used are listed over here. I hope you understood how to insert, how to delete a particular node from the w linked list. Thank you.