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.

A Competitive Programmer's Handbook

1117 pointsby aaggarwalabout 8 years ago

31 comments

hal9000xpabout 8 years ago
There should be references to problems for each topic at online judges. Like this one:<p><a href="https:&#x2F;&#x2F;uva.onlinejudge.org&#x2F;index.php?option=com_onlinejudge&amp;Itemid=8&amp;category=118" rel="nofollow">https:&#x2F;&#x2F;uva.onlinejudge.org&#x2F;index.php?option=com_onlinejudge...</a><p>Learning algorithms per se is only a small part of training. Much bigger part of training is learning how to <i>recognize</i> these algorithms in problems.<p>After reading about some algorithm, I always solve a couple of related problems.<p>P.S. Looks well-written. Bookmarked. I appreciate the effort of the author to create this book.
评论 #14116777 未加载
评论 #14118665 未加载
boltzmannbrainabout 8 years ago
Positive correlation between Competitive Programmer’s Handbook and software engineer interviews? Yes. Positive correlation between being a strong competitive programmer and a strong software engineer? Doubtful.
评论 #14120070 未加载
评论 #14119415 未加载
评论 #14119104 未加载
评论 #14119085 未加载
评论 #14120047 未加载
评论 #14120011 未加载
评论 #14122200 未加载
评论 #14119218 未加载
评论 #14119255 未加载
评论 #14118829 未加载
elnygrenabout 8 years ago
This book is being used for an optional undergrad algorithms course at University of Helsinki. We have programming competition style assignments: pass&#x2F;fail tests on a server with time and memory limits. Really fun challenges (and hard!!). Nice to see the author getting some recognition at HN :)<p>You can find the course material and assignments from <a href="https:&#x2F;&#x2F;cses.fi&#x2F;alon&#x2F;" rel="nofollow">https:&#x2F;&#x2F;cses.fi&#x2F;alon&#x2F;</a> - however, it&#x27;s all in Finnish.
ScottBursonabout 8 years ago
I have to tell a story I heard once about Brian Reid [0]. He was in one of these competitions -- this would have been sometime in the 1970s -- and they were given a deck of data cards and told to sort them. Most of the contestants started to write a sorting program in Fortran; Reid looked at the size of the deck and decided he could sort it by hand. He did, and won.<p>[0] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Brian_Reid_(computer_scientist)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Brian_Reid_(computer_scientist...</a>
atemerevabout 8 years ago
OK, who has published cheat codes for most programming interviews?<p>Seriously, if you can program at all, and want to be a better programmer (like, really well paid one), this is the greatest single thing I ever saw for this purpose. Just run through all examples and understand how they work, and you are already in top 1%.<p>Then, you can move to SICP and Project Euler in your spare time.
评论 #14118016 未加载
alexeeabout 8 years ago
There is also <a href="https:&#x2F;&#x2F;e-maxx-eng.appspot.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;e-maxx-eng.appspot.com&#x2F;</a> (translated from russian, original: <a href="https:&#x2F;&#x2F;e-maxx.ru&#x2F;algo&#x2F;" rel="nofollow">https:&#x2F;&#x2F;e-maxx.ru&#x2F;algo&#x2F;</a>)
评论 #14119233 未加载
user5994461about 8 years ago
Competitive programming = coding challenges, like Google Code Jam and HackerRank.<p>Nothing to do with getting a better job or a better salary.
评论 #14117283 未加载
评论 #14116217 未加载
评论 #14117079 未加载
评论 #14116303 未加载
评论 #14116409 未加载
评论 #14116594 未加载
评论 #14116981 未加载
评论 #14117997 未加载
评论 #14116426 未加载
评论 #14117626 未加载
评论 #14119127 未加载
TheAlchemistabout 8 years ago
For those interested -&gt; TopCoder annual competition just started (Marathon track which is usually 2 weeks length optimization problems): <a href="https:&#x2F;&#x2F;community.topcoder.com&#x2F;longcontest&#x2F;?module=ViewProblemStatement&amp;compid=55119&amp;rd=16903" rel="nofollow">https:&#x2F;&#x2F;community.topcoder.com&#x2F;longcontest&#x2F;?module=ViewProbl...</a>
aaggarwalabout 8 years ago
The author originally released the book here (<a href="http:&#x2F;&#x2F;codeforces.com&#x2F;blog&#x2F;entry&#x2F;50728" rel="nofollow">http:&#x2F;&#x2F;codeforces.com&#x2F;blog&#x2F;entry&#x2F;50728</a>).
signa11about 8 years ago
in a similar vein there is : <a href="https:&#x2F;&#x2F;cpbook.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;cpbook.net&#x2F;</a> which is also pretty cool. will take look at this also. thank you :)
uptownfunkabout 8 years ago
Excellent writing, clear and easy to understand. Would appreciate the links to example problems as others have mentioned (and solutions too if available). Seems like an interesting book to keep me sharp for if&#x2F;when I ever go on the job market. Well done.
z3t4about 8 years ago
i love solving problems. but hate solving programming riddles with artificial rules. it feels much more like work then actually real work does.
balazsdavid987about 8 years ago
This is a well-written book, very nice work!
SnowingXIVabout 8 years ago
Really into how this is written. I don&#x27;t understand much (any) c&#x2F;c++ but I&#x27;m familiar with ruby and JavaScript so basic programming functions I&#x27;m aware of. This book still is making sense and hitting on issues that I&#x27;ve always been interested in calculating O(n) and others.
grepthisababout 8 years ago
I really like this. I don&#x27;t like how you handle array indices though. The book is written in C++, yet you initialize all arrays where the first element is at index 1, which makes things really confusing, or at least annoying to think about when converting from your text to an IDE.
评论 #14125316 未加载
xsegfaultabout 8 years ago
Good review for algorithms and data structures. Hopefully we can get a printed copy later.
wwarnerabout 8 years ago
everyone should read this. btw, the problems at <a href="http:&#x2F;&#x2F;train.usaco.org&#x2F;usacogate" rel="nofollow">http:&#x2F;&#x2F;train.usaco.org&#x2F;usacogate</a> are really fun.
mattdodgeabout 8 years ago
Great timing considering Google Code Jam Round 1 starts tonight too
评论 #14117636 未加载
arvinsimabout 8 years ago
Another good resource for clearing technical whiteboarding tests.
评论 #14118486 未加载
bmayabout 8 years ago
Thoughts on this vs. Steven Halim&#x27;s handbook?
jiangplusabout 8 years ago
At first glance, I saw String Theory and was about to laugh, but then I found it was String Algorithm and Game Theory :D
mrcactu5about 8 years ago
i like this book because it has certain time and resource constraints in mind. that maybe a typical professional programmer does not have. but maybe someone from another subject can learn.
foscoabout 8 years ago
this is great!<p>that being said, I really like text files.<p>Does anyone know if there is a way to migrate the pdf to a text file [omitting figures&#x2F;pictures] ?
评论 #14117566 未加载
BatFastardabout 8 years ago
Thanks for sharing, will look it over and send you some feedback.
webluserabout 8 years ago
Great idea to name file with your book &quot;book.pdf&quot;
hkonabout 8 years ago
Great. Thanks!
yuanotesabout 8 years ago
Nice work.
dimitar9about 8 years ago
great stuff.read this,understand this and you&#x27;ll get google offer for 350k per year.
评论 #14116458 未加载
campermanabout 8 years ago
Not only is this an excellent introduction to competitive programming, it&#x27;s also a very nice overview of some of the nuts and bolts of C++. I recently have had to deal with a large C++ codebase and this is a really good little refresher.
bogomipzabout 8 years ago
This seems to be horribly written. Example:<p>&gt;&quot;In the German Lotto you have to select 6 numbers from the set {1,2,...,49}. A popular strategy top lay Lotto - although it doesn’t increase your chance of winning — is to select a subset S containing k (k &gt; 6) of these 49 numbers, and then play several games with choosing numbers only from S.<p>For example, for k = 8 and S = {1, 2, 3, 5, 8, 13, 21, 34} there are 28 possible games: [1,2,3,5,8,13], [1,2,3,5,8,21], [1,2,3,5,8,34], [1,2,3,5,13,21], ..., [3,5,8,13,21,34]. Your job is to write a program that reads in the number k and the set S and then prints all possible games choosing numbers only from S.&quot;<p>if K needs to be &gt; 8 how are the numbers in the selected subset {1, 2, 3, 5, 8, 13, 21, 34}? The majority of those are less than K. I have scratched my head about this for a few minutes. There are many that are equally as confusing.<p>See: <a href="https:&#x2F;&#x2F;uva.onlinejudge.org&#x2F;index.php?option=com_onlinejudge&amp;Itemid=8&amp;category=137" rel="nofollow">https:&#x2F;&#x2F;uva.onlinejudge.org&#x2F;index.php?option=com_onlinejudge...</a>
评论 #14126605 未加载
评论 #14121138 未加载
评论 #14120634 未加载
评论 #14120693 未加载
评论 #14120766 未加载
Zarovabout 8 years ago
Thanks for this, it may be exactly what I was looking for :)