computer-science-in-javascript icon indicating copy to clipboard operation
computer-science-in-javascript copied to clipboard

Computer science reimplemented in JavaScript

Results 16 computer-science-in-javascript issues
Sort by recently updated
recently updated
newest added

There is no implementation of Priority Queue in this project. Priority Queue is a very important data structure and it should be included in this project as well.

Thanks for these files! I've been studying them and I think there was extra code in the innermost 'if' condition.

is there a known issue for sorting when there is 0 in the array, I used a code similar to the one that you used in bubble-sort.js , but whenever...

Splice changes array.length and shifts remaining elements 1 place. Test: const tree = new Tree(); tree.add('ceo'); tree.add('cto1', 'ceo'); tree.add('cto2', 'ceo'); tree.add('cto3', 'ceo'); tree.add('dev1', 'cto1'); tree.add('dev2', 'cto1'); tree.add('dev3', 'cto1'); tree.add('dev2', 'dev3');...

https://github.com/benoitvallon/computer-science-in-javascript/blob/master/data-structures-in-javascript/tree.es6.js#L33 Splice in the for loop shifts the elements in the array and skips the sibling of the node that was removed. Fix PR: You can test with: ``` const...

Just wanted to practice a bit of js and thought that this might make the code a bit more generic. - Edits to the efficiency of the doubly linked list...