Skip to main content

Doubly - Linked List

Create a Doubly Linked List.


import { DoublyLinkedList } from 'athro';

let list = new DoublyLinkedList();

Available Methods

Methods available for the Doubly Linked List.

pushAdd item to the end of the DLLlist.push(value)
popRemove item from the end of the DLLlist.pop()
unshiftAdd an item to the front of the DLLlist.unshift(value)
shiftRemove an item from the front of the DLLlist.shift()
getGet a node from the DLLlist.get(index)
setSet value for an existing node in the DLLlist.set(index, value)
insertInsert a value at a specific index in the DLLlist.insert(index, value)
removeRemove an item from specific position of the DLLlist.remove(index)
reverseReverse the DLLlist.reverse()
traverseTraverse and print the DLLlist.traverse()