Doubly linked lists in Javascript

Web DevelopmentFront End TechnologyJavascript

Doubly linked lists are almost the same as a singly linked list in all operations, we just need to keep track of one extra link per node. In singly linked lists, we just had next links, in doubly linked lists, we have 2 links, next and prev.

Doubly linked lists are represented as −

Note that in the class itself, we also need to keep track of the tail(last element).

Published on 27-Jun-2018 10:27:38