This package implements a Linked List data structure with various methods.
-
append(value)
: Adds a new node to the end of the list. -
insertAt(value, position)
: Inserts a new node at a specific position. -
remove(value)
: Removes a node by its value. -
find(value)
: Finds a node by its value. -
printList()
: Prints the list. -
getSize()
: Gets the size of the list.
const LinkedList = require('namastey-linked-list');
const list = new LinkedList();
list.append(10);
list.append(20);
list.printList();