ashk_21's blog

By ashk_21, 2 months ago, In English

Hello Everyone,

I recently got placed and had a lot of time on my hands and decided to make a video on this topic cause in our country, India, a lot of students get into competitive programming cause they want to get better placements(not because they love it) and I wanted to clear misconceptions about this after researching a lot and so made this video.

Link

Edit: Like I said in the video, to clear any misunderstanding, if you love CP, then go as deep as you want, I am talking about those who do CP, just because they have to, for the sake of placements.

 
 
 
 
  • Vote: I like it
  • +22
  • Vote: I do not like it

»
2 months ago, # |
  Vote: I like it +6 Vote: I do not like it

Not every Indian do CP for placements, some do it cuz they love CP

»
2 months ago, # |
  Vote: I like it +6 Vote: I do not like it

hope this helps reduce cheating in Competitive programming

»
2 months ago, # |
Rev. 3   Vote: I like it -15 Vote: I do not like it

Possible adding to what's already said in the video but otherwise you can refer to this comment

Nope. You need to be smart for placements. I am currently in the internship season of our college. (It's not exactly placement but I would think the scenario would be similarish)

While CP will surely help you but you will have to make other preparations for company tests since they are slightly different. (I will add further details later if I feel like)

you can get away by doing only CP if you can perhaps make it to candidate master or better. (w.r.t initial coding tests only. Further rounds require more stuff as said in the video)

And yes you can get away even without doing CP too much you need to be smart and pick up the correct practice resources that's all.

»
2 months ago, # |
  Vote: I like it +24 Vote: I do not like it

Some comments as a former Google software engineer and interviewer:

  • The only real use of competitive programming in preparing for an interview is practicing your problem solving ability. As an interviewer I don't care what your Codeforces rating is, or even whether you have ever done any competitive programming.

  • In competitive programming the only things that matter are correctness and performance. When you are writing commercial code, and hence when being interviewed for a job, writing readable code, and being able to explain your code, is generally far more important than the performance of your code, and often even than its correctness. Doing too much competitive programming could get you into bad habits.

  • You should, however, know how to analyse the performance of your code, and be prepared to discuss how it could be improved.

  • One of the biggest skills in commercial programming is working well with a team. Most competitive programming is individual, so isn't helpful for this.

  • As an interviewer what I really care about is how you approach problems, not whether you know a particular clever algorithm. I am far more impressed if you come up with a good approach to a type of problem that you haven't seen before, than if you simply apply a standard algorithm to a type of problem you know well.

Overall, competitive programming is fun, but is only marginally relevant to getting a good job, and may give you some bad programming habits.

  • »
    »
    2 months ago, # ^ |
    Rev. 3   Vote: I like it +6 Vote: I do not like it

    Depends on the country you are in too.. Here we have more competition, so filtering is necessary.. SAD truth. Yeah you can be lured into CP for Job, but you may stay in it for reasons other than it.

  • »
    »
    2 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thank you for your insight, glad to see I got most of it covered in the video.

  • »
    »
    2 months ago, # ^ |
      Vote: I like it +84 Vote: I do not like it

    Doing too much competitive programming could get you into bad habits.

    I disagree with this. Even though I do a few "bad practices" on Codeforces like macros, including <bits/stdc++.h>, and unreadable recursive lambdas, I don't forget the proper way to do things if I knew it already. In an interview or job setting I won't accidentally type a nested ternary or something, because my mind will be out of competition mode.

    I would also add that competitive programming has helped me to build better habits in several ways. Especially for long implementation problems, writing readable code will help you debug and so you have an incentive to learn these skills. I learn not to do cheap tricks when I suffer the consequences myself. When I forget parentheses in some macro and struggle to debug it, I'm less tempted to use macros in the future. When I forget to clear a global variable between test cases, I learn not to use global variables so much.

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it
      Spoiler
      • »
        »
        »
        »
        7 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it
        A digression
        • »
          »
          »
          »
          »
          7 weeks ago, # ^ |
          Rev. 2   Vote: I like it 0 Vote: I do not like it

          And you haven't captured bad_practices, which in turn won't let your code compile.

          IMO globals will compile, without captures(&,=).

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

In India, for the coding round of most of companies problems are in the range of 1100-1400 of codeforces problems, and in interviews they are similar to the medium of leetcode's problems. My experience of the last 10 coding rounds and 3 interviews

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    That's correct from my experience as well, mostly talking from on campus point of view.

»
7 weeks ago, # |
  Vote: I like it +10 Vote: I do not like it

no

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    no, what?

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Is competitive programming essential for placements?

      no

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Not essential, but highly recommended. Especially as it gives a boost to your algorithmic and problem solving skills.

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

How about comapanies like codenation?

»
7 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Yes, competitive programming does help in coding tests those you will have to clear to appear for the interviews. It might not be that helpful in the interviews but it helps a lot in the coding rounds. Recently I had appeared for internship interview at a product based company and as a feedback the interviewer advised me to practice more and more quality problems and participate in short contests on codeforces :)

(This is my personal opinion/experience)

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Which company bro?

»
7 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I seriously believe that CP helps in coding round a lot bcz the format of coding round is more or less the same as any short duration contest. But I will say that CP can be dangerous in interviews.

Example 1: We consider nLogn of sorting and nLogm using bit manipulation as same but the interviewer consider nLogm of bit manipulation faster.

Example 2: If in a question of O(n) we traverse array twice or thrice, its normal. But in interview traversing array once is more optimal than traversing array more than once.

Conclusion : In CP we want a solution that execute in can pass the time constraint but in interview they want the best solution independent of time constraint.