8 ms·
JavaScript Algorithms and Data Structures (2018)
- me_bx 5y agoSimilar collection of data structure for JavaScript, with a focus on performance: Mnemonist [1]. [1]: https://yomguithereal.github.io/mnemonist/ https://yomguithereal.github.io/mnemonist/
- maga 5y agoAnd another one: Structurae[1] [1]: https://github.com/zandaqo/structurae https://github.com/zandaqo/structurae
- mirekrusin 5y agoAlso somehow related prelude [0]. [0] https://github.com/preludejs https://github.com/preludejs
- dsadsadsa22 5y agoWell, it's good resource. pleased by it. Can anyone suggest good Data structures and algorithms resource like this but not written in JavaScript?
- nonsapreiche 5y agohttps://en.wikipedia.org/wiki/Algorithms_%2B_Data_Structures_%3D_Programs https://en.wikipedia.org/wiki/Algorithms_%2B_Data_Structures...
- asicsp 5y agoSee https://github.com/tayllan/awesome-algorithms https://github.com/tayllan/awesome-algorithms
- NoWizards 5y agoThere is a resource that shows algorithms in multiple languages - rosettacode.org - it exposes the task (problem to solve) and its solution implementation.
- truly 5y agoDepending on what you are after, you may be better off implementing the code yourself. You will learn much more than by simply seeing the entire code already implemented. If you however need a strong implementation of some algorithm to use in production, you may want to search a robust library implementing it instead.
- DeathArrow 5y agoI think there is a strong correlation between the number of Javascript programmers interested in algorithms and data structures and the number of C programmers interested in front-end frameworks.
- wirthjason 5y agoC programmers love front-end development. The compiler front-end! :)
- deleted 5y ago[deleted]
- nefitty 5y agoIf it'll get me through the interview process I guess I can feign it.
- game_the0ry 5y agoDo we really need yet another list of algorithms to memorize for interviews? Is another list going to make a better JavaScript engineer? Will help me understand JavaScript better? Will it help me on the job? Will it make me a faster and better React developer? The obvious answer to all of the above rhetorical questions - fuck no. That being said, it is still a topic of interviews, so I will up-vote bc this is pretty good implementation, even though this repo has been submitted to HN at least 4 times in the past. Someone also mentioned Mnemonist [1] - that one is nice too. [1] https://news.ycombinator.com/item?id=28957373 https://news.ycombinator.com/item?id=28957373
- Waterluvian 5y agoReciting algorithms is reverse gatekeeping. If an employer wants to grill you on them, get out of there.
- imbnwa 5y agoDoesn't GOOG go hard in the paint with those questions though?
- game_the0ry 5y agoNot just GOOG, but all of FAANGMULAetc... and smaller start ups as well. Robinhood asked me a dynamic programming leetcode question for their web engineer (front end) role and Bloomberg asked me a OOP design question (asked to code in Python, even though I do not have Python on my resume...interviewer was a Python developer) for a javascript role - both were 1st round phone screens. The tech industry has normalized to the state of asking such question - its rare to be interviewed on domain expertise, unless you are interviewing at a fortune 500 big corp.
- Waterluvian 5y agoI’ve never been interviewed in any of these nonsense ways. I’m sure it’s popular. But it’s not everywhere.
- ape4 5y agoIs there any practical reason use, say, a linked list from this library vs javaScript's native growable array. You can use unshift() to delete in the middle.
- wffurr 5y agoOnly the usual reasons to use a linked list. E.g. if you want to store stable references to cells in the linked list as in a linked hash map.
- filoeleven 5y agoAre there practical reasons for using a linked list in JS? This is an honest question. I’ve taken immutability to heart, so storing a stable yet presumably mutable reference to a cell seems like a bad idea to me. (If it’s immutable, you can keep and use the cell’s value instead of caring that it came from a list.)
- oweiler 5y agoThat would be JavaScripts native Map, no?
- wffurr 5y agoTIL ES6 Map is guaranteed to iterate in insertion order. That always made me crazy in C++ too; the structure that I usually actually want is std::unordered_map not std::map. There are other algorithms and use cases for a stable iteration into an ordered sequence, but I can’t think of any off-hand. It is true that it’s rare to prefer a linked list on modern CPU architecture.
- dahfizz 5y agoPresumably, inserting and removing from the middle of a linked list is much faster than from an array.
- dehrmann 5y ago
- deleted 5y ago[deleted]