1.5.5 • Published 2 years ago

@reza2022/linked-list v1.5.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Linked List

Doubly Linked List implemented with JavaScript

Features

  • append(value) gets a value and creates a new Node with the given value and appeands the node to end of the list
  • prepend(value) gets a value and creates a new Node and appeands it to the start of list
  • size() returns a number that is the length of the list. starting at index 1
  • head() returns the first node in the list
  • tail() returns the last node in the list
  • at(index) gets an index and returns the value of the given index inside the list. returns an error if index is not correct
  • pop() removes the last element from the list
  • contains(value) gets a value and returns true if the value is found inside the list. returns false if value is not found
  • find(value) gets a value and returns the node of the given value, returns null if the value is not found
  • toString() console.log's the entire list one by one
  • insertAt(value, index) gets a value and an index and creates a new Node with the given value and insrets the Node at the given index
  • removeAt(index) gets an index and removes the Node inside the list at the given index
1.2.0

2 years ago

1.5.5

2 years ago

1.5.3

2 years ago

1.5.2

2 years ago

1.5.0

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago