level-wise breakup of competitive programming

I spent continuous 2 months of fully-dedicated work on algorithms, those were my best days, I can give advice on what felt from that time:

First you need to do some good programming in string manipulation, etc., some really shortcut coding is a must, for example using C++ STL, you need to write 1 line that will give you an understanding of about 5-10 lines. This way, you ideas will flow easily, that is, you write one/two line, what you want to do is already accomplished, so understanding of the whole library you are using is mandatory like C++ STL, etc.
Searching, linear & binary search are basic. Linear is too inefficient for many tasks, you will binary search in different forms in many other topics, but it is not easy to look & understand on how to apply a binary search at first, if you modify the problem slightly, you will know a binary search operation is possible.
Sorting, most times, quick sort will work, rarely others are required, I used Hoare variation implementation, not Lumuto variation somehow.
Recursion, in the begin, is it not easy, but will form basis for both Graph theory & DP, so Recursion should treated as most important topics in Algorithms, without which a good rank is nearly impossible.
Implementation: these are various different problems, so must be done after the above are done, else wastes a lot of time, these might required below topics too, but you can leave those few for later, after below topics are done.
Graph theory was very difficult in begin, I simply could not view how the graph worked, traversing, etc. Also the implementation were too difficult in the begin, however in 2 days after I coded them, I started understanding & thinking in a graph way, wikipedia was of great help. geeks for geeks was also good, but was slightly buggy sometimes, so depended mainly on wikipedia, only when its not clear on wikipedia then I checked other sources like all CP websites like topcoder, codeforces, hackerrank, hackerearth, but these were all slightly buggy some place or other, I left comments everywhere I read, slightly buggy here means the author went to 90% of understanding something, and then slightly went in other direction as per their understanding. This can be verified by understanding articles from multiple websites simultaneously. Anyway, after a 2 week struggle, Graph theory became, from difficult, to my favorite, earned a lot of points.
Trees are important, not enough emphasized on some popular websites inside the algorithms sometime back. That is, though you are strong in Graphs, Tree knowledge is mandatory.
Greedy/ DP, these are related somehow, if a problem looks different, if you think it might be related to Greedy or DP, but it does not relate to any classical DP or classical Greedy problem, then first apply Greedy and see, if the problem does not solve in an hour, then try DP. This needs you know already some of the famous classic DP & Greedy problems. Both DP & Greedy are equally tough after some level, you will not see through them easily.
Bit manipulation, sure this is still one of the toughest ones after DP, simply can’t think in bits, usage of bits are highly optimal and also complicated, and we are not in 80s/90s to get a lot of work at lower level to get comfortable with these problem types, information on this is scattered on internet, no one place has all related details for any topic, which makes it more difficult.
Game theory, this is deadly at first, the XOR is key, many problems on Nim, yeah I got a bit of frustrated at the begin. The actual reasons on why XOR or Nim are not written everywhere, everyone uses only to solve the problem, it took a of reading, and watch videos from various places to find the reasons behind. This is difficult topic after DP & Bit manipulation.
NP Complete: These are rare and are difficult to the core. A full understanding of above might help, I dint even try these with heart into it, when I verified 2 problems simply these are too deep, and centuries of research went in, ideally I should understand them but din’t due to time constraints.
Written by-Manoranjan poreddy(courtesy-Quora)

Comments

  1. firstly thanks for shared a wonderful blog for us. That blog have a good info about the kids programming. I agree with your superb thought. Keep continue that type of post, Such a lovely post!!!!
    Sg Education Programming Language

    ReplyDelete
  2. I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed Google Home vs. Amazon Echo

    ReplyDelete
  3. Really good article! Data structures play an important role in CP (competitive programming). Using websites like code forces, kattis can really help you!Online coding school

    ReplyDelete

Post a Comment

Popular posts from this blog

Forget Efficiency and start solving easier problems

Good schedule to follow for becoming better at competitive programming for beginners

Should I quit competitive programming? I am not good at it, but I like it very much?