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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Preparing for a Technical Interview: Algorithms and Data Structures

83 点作者 primaryobjects大约 8 年前

4 条评论

jasode大约 8 年前
Some constructive criticism... I would review your explanations to see if any imprecise sentences can be replaced with more accurate definitions. I get that you&#x27;re going for a friendly tone but many times, the more accurate definition is just as easy to read.<p>For example this text:<p><i>&gt;In the case accessing an element within an array or hash, it takes 1 operation to perform. Thus, we can describe the complexity as O(1) for this code example. This is about as good as it gets for algorithm complexity. Of course, while O(1) runtime code is quite fast, it may often come at the expense of storage.</i><p>It&#x27;s clearer to say that O(1) means <i>constant time</i> access in relation to input size. The &quot;1&quot; doesn&#x27;t mean one operation. The alternative explanations you wrote are actually misleading.
csnewb大约 8 年前
This is a great guide, thanks for sharing.<p>Out of curiosity, how do other employed developers allocate time to study this stuff? Immediately after graduating from college I could spend 4-8 hours a day most days of the week reviewing algorithms and solving problems without issues. Now, after a full day of coding at work, going to the gym, coming home to prepare dinner and run other errands, I&#x27;m physically and mentally drained. I might spend an hour or two before bedtime trying to study this stuff (since I completely forgot it since I last did technical interviews 1+ years ago) but progress is slow. Of course there are weekends, but that&#x27;s usually the only time I get to relax and go outside to see the sun. I now understand why it takes 6+ months for working professionals to find new jobs.
评论 #13980821 未加载
评论 #13980134 未加载
评论 #13979691 未加载
scott_s大约 8 年前
The text does not differentiate between worst-case and average-case analysis. Quicksort is worst-case O(n^2), but average-case O(n logn). Yes, I know the text says &quot;on average&quot; in parenthesis, but that&#x27;s not going to help a reader understand what that means. For an article that is meant to prepare people for a technical interview, I think it&#x27;s important to make this kind of distinction.<p>The article also says that merge sort is average-case O(n logn), which is true, but is likely to confuse readers, as merge sort is also worst-case O(n logn).
ggggtez大约 8 年前
The BFS tree traversal algorithm is also O(N^2). Very sloppy, I&#x27;d take off points.
评论 #13980588 未加载