...

/

Singly Linked Lists vs. Doubly Linked Lists

Singly Linked Lists vs. Doubly Linked Lists

Let's see how the two renditions of the linked list structure fare against each other.

Which is Better? #

DLLs has a few advantages over SLLs

  • Doubly linked lists can be traversed in both directions, which makes them more compatible with complex algorithms.
  • Operations involving tail become much faster. Deletion at the tail is one such example.

These benefits entail the cost of extra memory:

  • Nodes in doubly linked lists require extra memory to store the previousElement pointer.

Lets’s look at the implementation of ...