Skip to content
Programmingoneonone
Programmingoneonone
  • Engineering Subjects
    • Internet of Things (IoT)
    • Digital Communication
    • Human Values
  • Programming Tutorials
    • C Programming
    • Data structures and Algorithms
    • 100+ Java Programs
    • 100+ C Programs
    • 100+ C++ Programs
  • Solutions
    • HackerRank
      • Algorithms Solutions
      • C solutions
      • C++ solutions
      • Java solutions
      • Python solutions
      • Data Structures Solutions
    • Leetcode Solutions
    • HackerEarth Solutions
  • Work with US
Programmingoneonone

Deletion in Doubly Linked List Data Structure | DSA Tutorials

YASH PAL, 20 May 20204 May 2026

Deletion in Doubly Linked List – In this tutorial, we are going to learn how to perform deletion operations in the doubly linked list.

Deletion in Doubly Linked List

After completing this tutorial, you can learn how to

  1. Delete the first node.
  2. Delete the only node.
  3. Delete a node between the nodes.
  4. Delete the last node.

Deletion of the first node from the doubly-linked list

As you see, we have a doubly-linked list that has four nodes. So after deleting the first node, the second node becomes the first node.

Deletion of the first node from the doubly-linked list
Figure 1: Deletion of the first node from the doubly-linked list

So first, we store the second node’s reference to the start variable.

deletion in doubly linked list in data structures
Figure 2: Deletion of the first node from the doubly-linked list

And then we set the second node’s previous link part to Null or None. because the previous link part of the first node in the doubly linked list is always None or Null.

deletion in doubly linked list in data structures
Figure 3: Deletion of the first node from the doubly-linked list

So after performing these steps, the first node is deleted.

deletion in doubly linked list in data structures
Figure 4: Deletion of the first node from the doubly-linked list

Delete the only node from the doubly linked list

If a linked list has only one node, then to delete this node, we set the start variable to None.

Delete the only node from the doubly linked list
Figure 5: Delete the only node from the doubly linked list
deletion in doubly linked list in data structures
Figure 6: Delete the only node from the doubly linked list

Now our list becomes an empty list.

Delete a node between the nodes

To delete a node between two nodes, first we need to find out the reference to the node that we want to delete. As you see, to delete the third node first, we found a reference p to that node.

Delete a node between the nodes
Figure 7: Delete a node between the nodes

And then we store the reference of the node that comes after node p into the next link part of the node that comes before node p.

deletion in doubly linked list in data structures
Figure 8: Delete a node between the nodes

And then we store the reference of the node that comes before node p into the previous link part of the node that comes after node p.

deletion in doubly linked list in data structures
Figure 9: Delete a node between the nodes

Now, after performing these steps, the third node has been deleted from the doubly linked list.

deletion in doubly linked list in data structures
Figure 10: Delete a node between the nodes

Delete the last node from the doubly linked list

To delete the last node of the list, first we need to find out the reference of the last node.

Delete the last node from the doubly linked list
Figure 11: Delete the last node from the doubly linked list

And then we set the next link part of the node to Null or None that comes before node p.

deletion in doubly linked list in data structures
Figure 12: Delete the last node from the doubly linked list

So after performing these steps, the last node of the list is deleted.

deletion in doubly linked list in data structures
Figure 13: Delete the last node from the doubly linked list

Data Structures & Algorithms Tutorials for Beginners
Computer Science Tutorials Data Structures Tutorials computer scienceData StructureDSA Tutorials

Post navigation

Previous post
Next post

Leave a Reply

Your email address will not be published. Required fields are marked *

Programmingoneonone

We at Programmingoneonone, also known as Programming101 is a learning hub of programming and other related stuff. We provide free learning tutorials/articles related to programming and other technical stuff to people who are eager to learn about it.

Pages

  • About US
  • Contact US
  • Privacy Policy

Practice

  • Java
  • C++
  • C

Follow US

  • YouTube
  • LinkedIn
  • Facebook
  • Pinterest
  • Instagram
©2026 Programmingoneonone | WordPress Theme by SuperbThemes