TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Preparing for a Technical Interview: Algorithms and Data Structures

83 pointsby primaryobjectsabout 8 years ago

4 comments

jasodeabout 8 years ago
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.
csnewbabout 8 years ago
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_sabout 8 years ago
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).
ggggtezabout 8 years ago
The BFS tree traversal algorithm is also O(N^2). Very sloppy, I&#x27;d take off points.
评论 #13980588 未加载