Fast and simple linked list program for node.
let SingleLinkedList DoubleLinkedList = let sll = let dll = // objects to add to linked listlet collinObject = name: 'Collin' age: 21 let timObject = name: 'Timothy' age: 21 let daveObject = name: 'David' age: 24 // a static id is generated for each created node 0, .. nsllsllsll dlldlldll // delete timObject in linked listslldll // print the linked listslldll let singleNode = sll // returns daveObject as SingleModel objectlet singleObj = sll // returns daveObject let doubleNode = dll // returns daveObject as DoubleModel objectlet doubleObj = dll // returns daveObject let singlePrevNode = sll // returns collinObject as SingleModellet doublePrevNode = dll // returns collinObject as DoubleModel let singleCollinObject = sll // collinObject is equal to singleCollinObjectlet doubleCollinObject = dll // collinObject is equal to doubleCollinObject
Installation
This is a Node.js module available through the npm registry.
Before installing, download and install Node.js.
Installation is done using the
npm install
command:
$ npm install tcc-linkedlist
Features
- Single Linked List
- Double Linked List