Hacker News new | past | comments | ask | show | jobs | submit login
Algorithms for competitive programming (cp-algorithms.com)
196 points by memorable on Sept 19, 2022 | hide | past | favorite | 15 comments



This is really good, it was originally in Russian, by Max Ivanov. Another site that now offers some interactive leetcode-like functionality is USACO (The United States of America Computing Olympiad)[1]. Among other guides, they reference Competitive Programmer's Handbook (CPH) by Antti Laaksonen[2](PDF)

https://usaco.guide/

https://usaco.guide/CPH.pdf


See also "Algorithms for Modern Hardware" by Sergey Slotin https://en.algorithmica.org/hpc/

> Its intended audience is everyone from performance engineers and practical algorithm researchers to undergraduate computer science students who have just finished an advanced algorithms course and want to learn more practical ways to speed up a program ...


Leetcode problems mostly come from competitive programming. That's what FAANG wants: olympiad programmers.


I think the people who come up with leetcode problems are just going to be into competitive programming. There are a bunch of tricks that are specific to competitive programming just like there are a bunch of common tricks/themes in IMO problems. And, like in IMO, some of th3 required skills are only relevant to the competition and some are more generally applicable (even if part of the value of competitive programming is just being good at some coding interviews)


> part of the value of competitive programming is just being good at some coding interviews

This is crystallized into leetcode, which trains you for "technical" interviews that consist of solving leetcode problems. It's a circular system.

However, using algorithm puzzles is something of an improvement over old school puzzle interviews where you might have had to solve a rubik's cube, a chess problem, logic puzzles, or an arbitrary "brain teaser."


I wish discussions of such site didn't inevitably become discussions about software engineer interviews. It's a really nice site created by volunteers and I've often had it been the only decent resource online for a particular topic, if you want to use it as a reference their "terse but accurate" style for the prose and the compact working C++ code is really nice. And it covers some topics (e.g. treaps) which I've never seen appear in software engineer interviews.


This comment comes off as a little self-deprecating / resigned.

So I just want to say, don’t underestimate yourself! I think you would be surprised as to how much you can actually achieve/learn + how doable these problems are once your foundation is down.

The potential of the average person is vastly underestimated, and the “gifted”/genius person vastly overhyped.


Leetcode problems are generally the easy end of competitive programming. Otherwise nobody would pass them :P


Well, it certainly helps confirm my theory that Leetcode interviews are actually just intelligence tests.


Or proof-of-work tests

Or servility tests


> Or servility tests

Nice phrase - for most jobs servility/compliance is the most important qualification.

In many cases I expect whiteboard "technical" interviews could be replaced with one or two questions:

1. What is your experience in "programming contests" (actually algorithm puzzle contests such as ICPC, etc.)?

2. What was the last algorithms course you completed, and when and where did you take it?


Bookmarked, not a competitive programmer but definitely need to brush up on my algorithms; hope it's not too technical!


A recent thread on obscure data structures is also something I would recommend here: https://news.ycombinator.com/item?id=32186203

This thread is a gold-mine of useful/interesting stuff :)


That domain name could have been chosen with a bit more care...


Great website with curated content! Been using it since last 4 years! Highly recommend.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: