TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The Intuitive Guide to Data Structures and Algorithms

362 点作者 leeny超过 7 年前

12 条评论

Veedrac超过 7 年前
One thing I find generally worth improving with these sorts of introductions is that they always seem to introduce data structures as a pick-and-mix bag of prebuilt parts, rather than a set of techniques which allow you to enforce <i>properties</i> which allow you to build objects that do what you want efficiently. Teaching the former is like teaching a physicist all the different kinds of gear systems, rather than the math that lets you model them.<p>Knowing how binary heaps and hash maps work is great, because binary heaps and hash maps are very useful data structures, but knowing the fundamental reasons behind them in a way that composes to building new things is much more useful. What happens when you want properties that someone hasn&#x27;t already built a data structure for, at least as far as you can find? (Pet example: ordered container with efficient append and the ability to query the maximum of any subslice length k in O(log k). Extension: what are the minimal assumptions you need to do better, eg. amortized O(1)?)<p>I think this contributes to the attitude where programs are built out of monolithic, ill-fitting parts rather than actually looking at the problem and building the solution which does the right thing, the right way. (Pet example: if you designed websites as data structures and the browser to support doing so efficiently, 90% of requests on a site like Reddit would be a single `memcpy`.)<p>What I would attempt is rather than saying<p>&quot;Here&#x27;s one way we could do it: &lt;explaination of pre-baked hash table&gt;.&quot;<p>talk about the underlying tool first<p>&quot;One tool that can help us is hashing: &lt;explaination of general technique and why its properties are useful&gt;. In this example we want &lt;these properties&gt; but can&#x27;t immediately get it because our data has &lt;these properties&gt;. But we can apply hashing to get &lt;technique that looks decent but has caveats&gt;. Handling the caveats by doing &lt;hash table things&gt; gives us a data structure called a hash table.&quot;<p>Yes, this is probably a harder way to handle things, but I&#x27;d like to think it&#x27;d be worth the trouble.
评论 #15470591 未加载
评论 #15470832 未加载
评论 #15470847 未加载
评论 #15472341 未加载
评论 #15470838 未加载
评论 #15471646 未加载
andrei_says_超过 7 年前
A small thing: the slide in subscription popover contains language which is dangerously close to the dark pattern of framing refusals as guilt&#x2F;shame inducing.<p>A simple no thanks would do.<p>Because “they won’t remember what you did but hey will remember how you made them feel” and this made me feel “eww”.
评论 #15470122 未加载
评论 #15470163 未加载
cbzehner超过 7 年前
Interview cake is amazing. The way the problems are presented and the hints are given is often better than what you&#x27;ll get in an actual interview setting.<p>After using it myself, I could not recommend it any more highly.
评论 #15470054 未加载
victorhooi超过 7 年前
I was tempted to buy this - howevever, what turned me away was the subscription fee - it says:<p>&gt; No subscriptions to cancel—this is a 1-time charge. &gt; Access lasts (3 months) 1 year.<p>So sure - the fee may not automatically renew - but then you lose access to all the material after a year.<p>Is there not simply a way to pay for the course, and own a copy?
评论 #15471209 未加载
gameguy43超过 7 年前
Thanks for the post! Original author here. Happy to answer questions.
评论 #15470331 未加载
评论 #15470025 未加载
评论 #15469926 未加载
评论 #15470103 未加载
评论 #15470678 未加载
评论 #15470188 未加载
quickben超过 7 年前
A beautiful, amazing, and informative set of knowledge.<p>Sadly, an experience tarnished by the <i>three</i>, <i>full page</i> prompts for email subscription, right in the middle of the information flow.
partycoder超过 7 年前
I think these styles of puzzles borrow a lot from competitive programming (e.g: ACM, IEEE).<p>And while competitive programming requires skill, what you do most of the time is collaborative programming: create software that interoperates with other software, with a user, that is maintainable, etc. Software without these skills quickly becomes really expensive and hard to maintain.
gregable超过 7 年前
This is really beautiful. I love that the images are SVGs as well, makes perfect sense for these line drawings. Though it is a little bit of a bummer that all of them have embedded fonts, even those that don&#x27;t use text.
评论 #15470032 未加载
codingninja15超过 7 年前
@gameguy43, this is great guide. What resources were most helpful when constructing this guide? Any specific books?
hbk超过 7 年前
Take it easy with that email stuff. You say &quot;no spam&quot; but its literally spammed all around the page.
nixgeek超过 7 年前
What kind of &#x27;annual renewal&#x27; rate do you get at $199&#x2F;yr?<p>Is there a good reason not to just do $199 lifetime?
neeleshs超过 7 年前
This looks good, but I prefer my copy of Algorithm Design Manual by Skiena.