javascript-algorithms
javascript-algorithms copied to clipboard
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
closes #1016 closes #1004 ### To reproduce 1. Populate the list normally, insert few values. 2. call [insert](https://github.com/trekhleb/javascript-algorithms/blob/019c07e9e3bdd804b6d2ba2adab42f69cfc25bbd/src/data-structures/linked-list/LinkedList.js#L62) with `rawIndex` equals to last node index + 1 (exactly where new...
This PR solve the issue related to the ticket number #1008.
i just changed a word to teach some people how to contribute to a public repo
Peeking at the element should be done from the tail rather than the head.
If I use the below-insert method, I will give the input as insert(value, lengthOfTheList). In this scenario, the value is added to the end of the list, but the tail...
Added JavaScript mascot with link to Wikimedia Commons [https://commons.wikimedia.org/wiki/Category:JavaScript_mascot](https://commons.wikimedia.org/wiki/Category:JavaScript_mascot) [https://javascriptmascot.org](https://javascriptmascot.org)
## What's the problem? - `MaxHeapAdhoc` and `MinHeapAdhoc` constructor can get an array for filling the heap initially. - And then the constructors execute this: ```js this.heap.forEach(this.add); ``` - But...