javascript-algorithms
javascript-algorithms copied to clipboard
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
Fix for issue: Wrong array representation in Heap README.md #640
I have fixed the [issue](https://github.com/trekhleb/javascript-algorithms/issues/640) regarding the array representation of HEAP. Kindly review. Thanks
In the `README.es-ES.md` file to explain the linked list, there were many typos in the description of the algorithm.
ran lint and test with no issues
Inserting, removing, accessing, modifying, by index, on linked list
``` Insert(head, index, value) Pre: head is the head node in the list Post: the list at the new index is the value; all items in the list are shifted...
Index methods ll
Hi, I created the algorithms for removing, accessing, and modifying at an specific linked-list indexes for the issue #835 . I tried my best to replicate the code strucutre of...
Adding of a method that get the successor of a node inside the birany search tree
I have added one file to your repository, this file contains a function which take a number and returns the power of two which is directly greater than the given...
Bit Reversal missing?
Something along the lines of: ``` function bitReverse(num){ var result = 0; for (var i = 0; i < 8; i++) { result = result * 2 + (num %...
traverse linked list is easy but uninteresting. You must add new variable and use while.So why not add a method to return a iterator.Then we can use for of to...
Provide possible paths from A to B in a directed graph
Hi, I would like to know if you have an algorithm to find all possible paths (cyclic or acyclic) in a directed graph from certain node A to B. Although...
choose pivot from median of three elements for quicksort
The method for choosing the pivot as implemented at the moment results in degenerate behaviour when the array is already sorted or reverse sorted. A better way is to choose...