A Singly and Doubly Linked List
npm install LinkedList
var LinkedList = require("LinkedList");
var SinglyLinkedList = LinkedList.Singly();
var DoublyLinkedList = LinkedList.Doubly();
- Provides Linked list data structure.
list.add(10);
list.add(20);
list.add(30);
// 10 20 30
list.delete(10);
// 20 30
list.isExist(20); // Returns true, false otherwise
list.indexOf(30); // Returns 1 [0 Based], -1 for not found
list.length(); // Returns 2
list.each(function(item){
console.log(item);
});