Monday, 15 July 2019

How do I learn competitive programming as a beginner?

Competitive Programming is a great way to showcase your problem-solving skills, which is certainly something a lot of companies look for. Today, most interview questions of tech companies are level 2 or 3 problems that most Competitive Programmers anyway solve.
  • You can very well use your ratings [achieved on various competitive programming platforms] on your resume to show how you stand out amongst your colleagues! (Believe it or not, recruiters do get impressed by seeing your performance on online platforms).
  • You will learn how to approach a problem with the best of the best possible ways, you will learn how to analytically think and solve a problem and analyze it’s space and time complexity.
  • Every large MNC or Product-based company prefers to have initial filtering round which consists of Competitive Programming problems.
  • You will get to learn a programming language end to end.
  • The adrenaline rush that you will get after seeing the green tick and your name on the leaderboard - there’s nothing compared to that.
There are essentially 6 key steps in learning Competitive Programming:
  • Step 1, Learn a well-known programming language: You can do competitive programming in any programming language but it is highly recommended that you choose one of C/C++ or Java. The reason being that the time of execution is a key factor in Competitive Programming and so, choosing a language whose time of execution is fast is surely going to give you a benefit. C/C++ and Java are relatively faster, particularly when compared to languages like Python.
  • Step 2, Starting with Competitive Programming: Start practising on Hackerrank, it has a great IDE and a wonderful beginners program which will help you in getting started. Hackerrank has a great set of problems whose difficulty increases gradually and hence you will not face a sudden rise or fall of difficulty and it also lets you view the test case on which you code failed which will help you greatly in making test cases as well as learning how to debug the code for the case on which it failed. As a total beginner, it is important that you are able to see the test case which failed so that you can learn how to target such corner cases.
  • Step 3, Get Familiar with Data Structures
  • Step 4, Get Familiar with Algorithms: Algorithms are logics that are implemented on various Data Structures to achieve the desired output.
  • Step 5, Starting with actual online competitions: Once you are familiar with time complexities, I/O operations of online IDE’s and penalties you can start with actual competitions.
  • Step 6, Practice Practice Practice: People say that practice makes man perfect but in the world of Competitive Programming, no one has ever achieved that mark yet no matter how much you practice you will always miss something but that’s the glorious part of Competitive Programming that you never get done with it.

4 comments:

  1. What to do when some test cases with large input go wrong?
    Like 100000 push/pop/find max operations each push operation giving input upto 9 digits.

    ReplyDelete
    Replies
    1. Check the corner cases. Usually, the error is in the corner cases.

      Delete
  2. How to know that it's time to start step 3/4?

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete

How much time will it take to create Quora?

If you really want to build a product that scales to 100 million users, it will be a real big gun and I am sure you will face many challen...