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.
This book is being used for an optional undergrad algorithms course at University of Helsinki. We have programming competition style assignments: pass/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 :)
You can find the course material and assignments from https://cses.fi/alon/ - however, it's all in Finnish.
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.
[0] https://en.wikipedia.org/wiki/Brian_Reid_(computer_scientist...
OK, who has published cheat codes for most programming interviews?
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%.
Then, you can move to SICP and Project Euler in your spare time.
There is also https://e-maxx-eng.appspot.com/ (translated from russian, original: https://e-maxx.ru/algo/)
Competitive programming = coding challenges, like Google Code Jam and HackerRank.
Nothing to do with getting a better job or a better salary.
For those interested -> TopCoder annual competition just started (Marathon track which is usually 2 weeks length optimization problems): https://community.topcoder.com/longcontest/?module=ViewProbl...
The author originally released the book here (http://codeforces.com/blog/entry/50728).
in a similar vein there is : https://cpbook.net/ which is also pretty cool. will take look at this also. thank you :)
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/when I ever go on the job market. Well done.
i love solving problems. but hate solving programming riddles with artificial rules. it feels much more like work then actually real work does.
This is a well-written book, very nice work!
Really into how this is written. I don't understand much (any) c/c++ but I'm familiar with ruby and JavaScript so basic programming functions I'm aware of. This book still is making sense and hitting on issues that I've always been interested in calculating O(n) and others.
I really like this. I don'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.
Good review for algorithms and data structures. Hopefully we can get a printed copy later.
everyone should read this. btw, the problems at http://train.usaco.org/usacogate are really fun.
Great timing considering Google Code Jam Round 1 starts tonight too
Another good resource for clearing technical whiteboarding tests.
Thoughts on this vs. Steven Halim's handbook?
At first glance, I saw String Theory and was about to laugh, but then I found it was String Algorithm and Game Theory :D
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.
this is great!
that being said, I really like text files.
Does anyone know if there is a way to migrate the pdf to a text file [omitting figures/pictures] ?
Thanks for sharing, will look it over and send you some feedback.
Great idea to name file with your book "book.pdf"
Great. Thanks!
Nice work.
great stuff.read this,understand this and you'll get google offer for 350k per year.
Not only is this an excellent introduction to competitive programming, it'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.
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.
This seems to be horribly written. Example:
>"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 > 6) of these 49 numbers, and then play several games with choosing numbers only from S.
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."
if K needs to be > 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.
See: https://uva.onlinejudge.org/index.php?option=com_onlinejudge...
Thanks for this, it may be exactly what I was looking for :)
There should be references to problems for each topic at online judges. Like this one:
https://uva.onlinejudge.org/index.php?option=com_onlinejudge...
Learning algorithms per se is only a small part of training. Much bigger part of training is learning how to recognize these algorithms in problems.
After reading about some algorithm, I always solve a couple of related problems.
P.S. Looks well-written. Bookmarked. I appreciate the effort of the author to create this book.