A DoublyLinkedList is a linear data structure where each node contains a reference to both the next and previous nodes, allowing traversal in both directions.
import { DoublyLinkedList } from "collection-kit";
import { DoublyLinkedList } from "collection-kit";
const list = new DoublyLinkedList();
list.add(10);
list.add(20);
list.add(30);
console.log("Size:", list.size()); // 3
console.log("First element:", list.get(0)); // 10
console.log("Last element:", list.get(2)); // 30