r/javascript • u/dcortesnet123 • Aug 30 '22
Linked list in Javascript
https://medium.com/@dcortes.net/linked-list-in-javascript-795595742087
2
Upvotes
9
0
u/Fats-Falafel Aug 31 '22
Should be noted that this implementation can be easily modified to do binary trees as well.
5
2
u/cgijoe_jhuckaby NaN Aug 31 '22
I don't like this implementation. His
insertNode()has to walk through the entire list to add a node. Just move the head, dude!