Where can I learn the competitive programming techniques and algorithms in a systematic way?

I know that there are really good tutorials available at topcoder, but if a beginner wants to go from basics to advance to level.
What are the things needed to do for that systematically?
I’m a intermediate user and able to solve about:

  1. 4 problems in codechef long contest
  2. 2 in short
  3. 2- 3 out of 5 in codeforces (2 hour contest).
    But things seems to be saturated to me, I’m observing a slow improvement.
    I just wanted to boost it up smartly !
8 Likes

1.Go to the getting started link on the codechef home page. It contains links to good resources.

  1. As far as problem solving is concerned, start from the easy section on codechef, and, start from the problems with most submissions because problems with most submissions, in most of the cases are the easiest.

3.Here’s what you can do these vacations:

Start studying data structures: graphs, trees, segment trees, binary index trees and many more DS concepts.

start studying the basic algorithms like graph algorithms, searching algorithms, shortest path algorithms, string matching algorithms, maximum subarray problem, dynamic programming, greedy algorithms and many more.

I can suggest a book on algorithms: Introduction to algorithms by Cormen


4.If you are unable to solve problems in starting take help from the Editorials.

5.You can always post here, if you have any problem.

6.There are many more posts in discuss section of codechef with tags algorithms or algorithm, that will also be very helpful, if you could just take a look at them.

8 Likes

Hi,

Just to add to the amazing answer given by @pratku123, I can suggest you some things which I’ve been doing myself and appear to be working, although, very slowly.

What I’ve been doing is simple:

Explore ALL the websites!!! Get accounts on as many sites as you can and solve as many problems as you can!! Even if you can still only solve 1 or 2 problems on your own, study the editorials and see solutions from top competitors. Start “packing” problems by their specific types:

See a problem with a large array and queries? Fenwick Tree/Seg-Tree is the way to go. When you reason about it on paper, do you end up repeating calculations yourself? Maybe DP with memoization helps… If you don’t have any sort of “template” codes for all these methods, use the solutions from editorials and/or top competitors and adapt them so you feel comfortable using them… build yourself what I call a: “code library of concepts”, i.e. you now have codes for SegTrees, general memoization, fast exponentiation, dfs/bfs, etc… These concepts show up ALL the time along with Mathematics and some “classical”/ad-hoc problems and, if you have them “stored” as code templates, your understanding of them and of some previously unapproachable problems feels almost like magic! Seriously!!.

These “classical” ones have been the hardest ones for me to master and I guess that they take A LOT of time to master unless you are a “natural talent”. Well I’m not, but I can safely say that taking part in several websites has at least helped me, even if only to broaden my horizons and build myself a “code library”. After a while doing this you will “naturally” get sharper and better, but, it takes time :slight_smile:

And above all,

Have fun, that’s the only thing that matters!!

Bruno

9 Likes
//