算法与计算机科学github.com编辑精选
用 JavaScript 讲解并实现的算法与数据结构
Algorithms and Data Structures Explained and Implemented in JavaScript
2018 — 2021,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
这是一个用 JavaScript 实现并配有详细讲解的算法与数据结构开源仓库,涵盖链表、哈希表、图、排序等大量主题,README 文档详尽清晰。它多次登上 Hacker News 首页,是学习算法的热门参考资源。
为什么经久不衰:它把抽象的算法概念用易上手的 JavaScript 实现并配以清晰文档,既适合面试准备,也适合长期复习,因此多年来持续受到关注。
HN 评论精选
肯定整体质量,但指出部分数据结构实现并非最优方案
文档和代码质量都不错,但一些实现选择有待改进:队列和栈用的是链表而非数组,哈希表用封闭寻址而非只稍微复杂一点的 Robin Hood 开放寻址,并查集也没有路径压缩和按秩合并。总体很好,稍加打磨就能从“很好”变成“卓越”。
eximius查看英文原文
The documentation and code quality is all good. The implementation choices leave some things to be desired. The Queue and Stack implementations are Linked Lists instead of array backed, the hash table is closed instead of (the only barely more complicated) open Robin hood hash table scheme, the union-find/disjoint-set implementation doesn't have path compression or rank unions. Overall very good, but it could be Great (tm) with just a little bit of work.
称赞仓库质量,同时质疑日常 JS 开发中算法工作的实际占比
这个仓库很漂亮,README 详细清晰,内容相当全面。作为原生 JS 开发者,我很期待看看非树形图的实现。不过话说回来,我工作中遇到的算法问题往往很琐碎或是一次性的,比如按人类时间调度事件。其他 JS 同行实际会做多少算法工作?
teachrdan查看英文原文
This repo is beautiful. The README is detailed and clear, and the contents seem pretty exhaustive. As a native JS guy I'm especially excited to check out the implementation of non-tree graphs! Having said all that: The algorithms I've had to tackle at work tend to be fairly trivial or total one-offs involving scheduling events in human time. How much algorithmic work do you other JS folks end up doing?
认可作者的实现质量超出自己同类尝试
我有过同样的想法,还因为你先做出来而难过。但看了代码后发现你做得比我会做的更好,干得漂亮!
superkarolis查看英文原文
Had the same idea and got sad you got there faster. But then I looked at the code and realized you did it better than I would have done it so good job!
质疑刷算法对实际工程的价值,但承认其面试用途和实现质量
我们真的需要又一个为面试背诵的算法列表吗?它能让某人成为更好的 JavaScript 工程师吗?能帮我理解 JS、帮到工作、让我成为更快的 React 开发者吗?答案显然都是否定的。话虽如此,这仍是面试话题,而且实现确实不错,所以我还是点赞,尽管这个仓库至少被提交过四次了。
game_the0ry查看英文原文
Do 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
历次讨论
同类还值得读
位运算技巧集
Bit Twiddling Hacks
斯坦福页面上的经典位运算技巧合集,收录了 popcount、前导/尾随零、位反转、交换、舍入等大量技巧,并附有解释和性能讨论。
算法与计算机科学上首页 8 次 · 2011–2024graphics.stanford.edu编辑精选如何不按平均评分排序
How Not To Sort By Average Rating
经典文章解释了为什么按平均评分排序不可靠:只有少量评价的条目(比如仅一条五星)会轻易排到最前,而评价数量的差异被忽略。
算法与计算机科学上首页 7 次 · 2009–2024evanmiller.org编辑精选数据结构可视化
Data Structure Visualizations
旧金山大学 David Galles 教授制作的数据结构与算法交互式可视化网站,涵盖 B 树、红黑树、排序、图算法等,可逐步操作观察其运行过程。
算法与计算机科学上首页 6 次 · 2011–2021cs.usfca.edu编辑精选1996 年以来的计算机科学最佳论文奖
Best Paper Awards in Computer Science since 1996
Jeff Huang 维护的一个汇总页面,收录了自 1996 年以来计算机科学各主要会议的“最佳论文奖”获奖名单,并按年份和会议整理,方便读者一站式浏览历届获奖论文。
算法与计算机科学上首页 6 次 · 2010–2018jeffhuang.com编辑精选算法(Jeff Erickson)
Algorithms, by Jeff Erickson
伊利诺伊大学 Jeff Erickson 教授的算法课教材,免费在线开放。
算法与计算机科学上首页 5 次 · 2018–2022jeffe.cs.illinois.edu编辑精选