Home | Projects | Notes > Data Structures & Algorithms > Doubly-Linked Lists

Doubly-Linked Lists

 

Introduction

A doubly linked list is a linear data structure where each node contains a data value, a pointer to the next node, and a pointer to the previous node. This bidirectional linkage allows traversal in both forward and backward directions. It is particularly useful when two-way navigation or efficient deletion from both ends is required.

 

doubly-linked-list

 

Pros:

Cons:

Compared to Singly-Linked Lists:

 

Implementation (C++)

Header (dlist.hpp)

Source (dlist.cpp)

Test Driver