@datastructures-js/linked-list
Advanced tools
Comparing version
@@ -8,2 +8,6 @@ # Changelog | ||
| ## [Unreleased] | ||
| ## [5.2.5] - 2023-01-09 | ||
| ### Fixed | ||
| - a bug in `removeEach`. | ||
| ## [5.2.4] - 2022-09-04 | ||
@@ -10,0 +14,0 @@ ### Fixed |
| { | ||
| "name": "@datastructures-js/linked-list", | ||
| "version": "5.2.4", | ||
| "version": "5.2.5", | ||
| "description": "a javascript implementation of LinkedList & DoublyLinkedList", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -146,5 +146,7 @@ /** | ||
| if (prev === null) { | ||
| this.removeFirst(); | ||
| this._head = this._head.getNext(); | ||
| current = this._head; | ||
| } else { | ||
| prev.setNext(prev.getNext().getNext()); | ||
| current = current.getNext(); | ||
| } | ||
@@ -155,5 +157,5 @@ this._count -= 1; | ||
| prev = current; | ||
| current = current.getNext(); | ||
| } | ||
| position += 1; | ||
| current = current.getNext(); | ||
| } | ||
@@ -160,0 +162,0 @@ return removedCount; |
39690
0.37%889
0.23%