I am quite depressed by my performance in recent contests on various online judges. I have been practicing for a long while now but showing no improvement. What should I do now? Should I leave competitive programming or continue...

Assuming this is your real account. I see you registered in CF before 5 months and you have participated in just 5 contests here. This is by no means a lot of practice. It usually takes at least a year to see significant improvement in your competitive programming skills. My suggestion is to keep practicing without loosing motivation even if you fail in contests. It is almost certain that improvement will come over time!

I find confidence to be a big predictor in performance in programming contests. You have to trust yourself that you can really solve those hard problems. In solving some world finals problems recently I found that most of them don't require some random super advanced algorithm that you just have to know (some do, but usually not). It just really requires you to work hard and figure out the cases and come up with a program to solve the problem.

My suggestions for you are to work on Div2 contests and continue upsolving. Make sure to solve every C problem and work on a D problem every now and then. Once you read a problem, don't leave it unsolved. Read editorials and solutions until you understand it completely. You will find that many of them aren't as complicated when you make an effort to learn.

Most of learning is done through upsolving. Contests are just a test of your skill, you solve as many as you can. What you should try to do is learn to solve what you can't.

Don't be depressed. Take it as a sport, in which you play better on same day and not so good on some day. But what it takes is regular practice. If you are loyal to your practice, then it's just a matter of time when your rating will shoot up. Also, don't think to much about contest, rather try to be bit relax.But, there is no hard and fast rule or mantra. Just work hard until you succeed.

I looked at your submissions, and there are very few. I know you said you are practicing on various judges, but there are VERY few problems on CodeForces so I recommend this: if you want to improve your CodeForces rating, practice problem on CodeForces. Also, practice problems with difficulty >= your rating. If you solve easy problems, you are wasting your time. Good luck!

From your perspective, what is the rating ceiling for 50th percentile (potential-wise) of population under the age of 50 having Internet access?

"Let's see you become as good" is poor analogy, because it is like saying "Let's see you beat tourist/V--o_o--V/Um_nik/Petr". There is enormous difference between what is typically considered "good" by people asking this kind of questions and the level of elite contestants.

My point is that mentioning "his/her own limits" is often not reasonable and even funny — though I should say straight away that I have very little evidence on what should be considered "achievable only for some very special people" in competitive programming, except of some subjective thoughs and personal experience.

By no means I'm saying that the analogy below is applicable in this particular case; but just to give you something from my side, reading this kind of comments often feels like if somebody is asking

I've never ever been able to perform even a single pull up, is it possible for me to learn how to do a pull up?

And the reply that they get goes like

Different people are different in terms of genes, some people have more fast-twitch muscle fibers while others have more slow-twitch fibers blah-blah-blah...

Going back to the subject of this question and this comment thread: if we'd pick CF users who are not capable of getting rating above 1400 even after long period of dedicated practice (because their limits are lower than that), how large the percentage of such users is going to be? 0.1%? 1%? 5%? 25%? 50%?..

Going back to the subject of this question and this comment thread: if we'd pick CF users who are not capable of getting rating above 1400 even after long period of dedicated practice (because their limits are lower than that), how large the percentage of such users is going to be? 0.1%? 1%? 5%? 25%? 50%?

I don't think we can answer the OP's question by simply answering this question. Rather, we have to look in detail about the OP's attributes. E.g. How long he has practiced, how "gifted" is he in algorithms, how fast does he learn, etc. Unfortunately , we do not have info of all these to make a reasonable conclusion.

That's why, I mentioned in my original comment, "if he does not have what it takes...". That's in no way biased toward a yes/no answer.

The main issue of this post is, it is too vague. That's why I answered with a non-specific answer.

evreyone has a brain and it can be polished. cp is like math, everyone can do maths.

Can be polished? To what extent? Don't oversimplify stuff. Everyone can do maths? Well, can everyone become an Alan Turing/Donald Knuth/Gennady in this lifetime? Will there be a person who can "polish" his brain enough to solve P=NP problem in his lifetime?

Well. We pretty much don't know the answer to these questions (unless you have some divine power or something). So please don't equate "everyone can do 1+1" to "everyone can do Quantum Physics".

I don't know if there is an English translation of this book : 4839941068 (ISBN10), it's by a Japanese world finalist. People in my school mainly use this book, I think the example problems are well chosen.

People also recommend the uva book for programming contests (competitive programming 3), I have read only a few chapters and I think it is better than the previous Japanese book for those new to CP (the japanese one has a lot of advanced material that you don't need until you are orange XD).

I have been doing competitive programming for over 1 year. I have solved a total of 562 problems so far. 348 of them are from Codeforces. But as you can see I can bearly solve A and B in or after the contest. And I struggle with being a pupil. In my graph, you can also see that once my rating dropped to 534. But I don't think like you. I think I am getting a smaller improvement every day. I get fun while solving problems so I never get depressed about my contest performance. It is a unique fun to solve a single problem in a contest. And if you think you are depressed then you should do something else instead of competitive programming. Good Luck. :)

It's been 4 months, I have left my Job and doing CP. I am still "Pupil". But that doesn't mean, I know nothing. Every Contest teach me something and I will continue it, till I don't become "Purple". You can see my Graph. The struggle is real from last October.

Chill Dude, I have a different Story. There is a major reason behind leaving my Job.

In mid Sept,I have been to Google Onsite Interview and got rejected in 5th Round.In my feedback She told me to focus more on Data Structure and Algorithms. Also, She suggested me to practise a lot on Codeforces, TopCoder, etc and Improve my problem Solving Skills.

There is a chance,that I may receive a call again and I don't want to miss another opportunity. I graduated recently and at age of 23, I can take Risk.(If not know, then when). Being Purple is just a satisfactory level. If I feel I will not be able to achieve it, I will join a different Company or Startup.

I want to pursue my carrer as Software Developer(Google/Facebook) and In order to crack those, One must have deep knowledge of Algorithms and programming. It's my personal Decision, and I have learned a lot in these 4 months(2 more months to go). Sorry for bad English and Opinion's are Welcome.

I still think quitting your job is a ridiculously irresponsible decision, and while you may have some source of income sustaining you for the past few months, the same may not be true for other people considering the same decision, and they may feel inspired to go through with their decision after seeing a comment like yours.

The level of depth of DS/Algo knowledge required for FAANG level companies is much lower than purple. It is probably mid to low blue. And, at least when interviewing for FAANG in the US (I see you are from India, where it might be a bit different), Leetcode is certainly a much better resource than CodeForces for interview prep.

Also, there are some interview questions that won't ever really appear in a place like CF or HackerRank. Some that come to mind are questions where the intended runtime is smaller than the size of your input (median of two sorted arrays, finding element in matrix where rows and columns are individually sorted, etc.). This is because CP questions require you to do your own input, so the runtime complexity is bounded by the input size. A lot of interview questions are of this flavor, and you would never get to practice them.

There are many paths to Google/Facebook. But I think you take on unnecessary and potentially dangerous levels of risk when you quit your job just to practice.

EDIT: Sorry, I didn't read the part where she said specifically to practice on CF/TC. I suppose the interview process that you had may be a bit different.

EDIT2: Apparently, judging from your other reply, you're still not convinced. I don't really blame you, especially because I was kind of yelling at you, and that's not likely to convince anyone. I got offers from Google/FB, so I'm not talking out of my ass, and I will say that being good (or relatively good) at competitive programming makes the interview process pretty easy, but if you're starting from square one, the idea of training CP to get better at interviews makes about as much sense to me as saving up money for a flamethrower to solve the problem of killing flies in your house. Flamethrowers happen to be useful for other things and are also pretty fun, but it's a bit overkill. Just get a flyswatter. Go do Leetcode. It'll get the job done, and do it well.

I can see you are a Graduate from University of Michigan(Ranked in top 50) and I am from a tier-2 college(Not even in top 1000).It's easy for you to get a call from top Companies,but not for me.

The whole "Purple" thing is just to get an attention from recruiter of top Companies, I know about "LeetCode", but that's not going to help me to get an Interview Call. It's true, that LeetCode have a better preparation material, but to prove my worth I need a good Rating.(I am doing this just to get shortlisted among millions of Applicants).

Till now, I have applied several times to Amazon ,Microsoft,Google, Facebook, But I only managed to get a call from Google(only one time).I have seen a common trend in Google Hiring whenever it come to campus, It hires the person who is really good at competitive Programming(1800+ rating or ACM-Qualified).

About Financial Stability. You may know that FAANG level companies pay's very well. Let's suppose my current salary is X, then what FAANG level companies is going to pay me is nearly around 3X (Fresher Level), including joining bonus it will be nearly 6X. So, it's totally worth for me to prepare for 6 months, as my 6 months salary will compensate in first month Salary at FAANG. Also the exposure is better at FAANG Level.

Also after spending 4 year(Graduation), If I earn X amount of money, then it's totally worth for me to spend more half year(on CP) to get 3X amount of money. Being financially unstable for 6 months is totally worth here.

About your Flamethrowers and Flyswatter story, I am not neither going to spent money on Flamethrower nor I will buy a flyswatter. I will rather try to get rid of them by some natural method like Burning Neem (Oil/leaves), Pinion wood or Rosemary ,without spending any money.

Thank's for LeetCode suggestion, I will do consider if for preparation, till now I was just practising on geeksforgeeks and interviewBit.

About leaving the Job scenario. Many people in India do that to get a better one like, opting for Cisco or Redhat certification, OCJP or CEH certfication, AI/ML Courses, Diploma in Data Analytics, etc. I think leaving a job is not a problem if it gives Boost to your carrer.

I am preparing for Google/FB, but you already have them. So It might be hard for you to understand.(Situation is Different)

You are right. My opinion is certainly biased by the fact that I go to a target school for big tech companies, and it is certainly harder for you to get an interview call. However, you did get one from Google, and there must have been some reason for that. There must have been some good evidence on your resume that allowed it to not go into the auto-reject pile, and my suggestion is that you double down on that stuff. However, if you have noticed a trend that recruiting for the Indian offices seems to be skewed towards people who have CP experience, you may be right. I've heard this is common among the Indian branches of the tech companies.

As to whether the 6 month gap is worth it: I suppose that depends on how confident you are that you will, in fact, get an offer after those six months. How sound the decision is is pretty heavily based on that probability. That's really only for you to judge. If it's common enough in India, then perhaps it's not as irrational as I made it out to be, but it still seems bizarre and unnecessary from my perspective.

I didn't mention my offers to those companies to brag, I mentioned them to point out the fact that I was once in your shoes (wanting to get offers there) and I have some insight into how.

The whole "Purple" thing is just to get an attention from recruiter of top Companies, I know about "LeetCode", but that's not going to help me to get an Interview Call.

Random note: there are lots and lots of ways to get attention from recruiters, and competitive programming is only one of them. Moreover, I think it is not the best one — but that's my subjective opinion :) It is definitely better than doing nothing and having empty CV, but I don't see why it should be necessary better than contributing to open source, or doing some actual software development, or being involved in some research etc.

Among the people that I work with at Google, majority don't have competitive programming experience.

I agree with what's written in suggestions above — leaving your job in order to do competitive programming in order to hopefully get a better job sounds like a totally wrong thing to do. In pretty much any way — with reasons ranging from what I wrote above about doing CP to get job, to "unless something is totally wrong with your current job or with your life, you should be able to do more than enough interview preparation / CP while still keeping the job", and "Good luck explaining typical recruiter why you decided to stop practicing programming thinking that quitting practicing software development will make you better software developer".

My work at previous startup was really heavy and It was not possible for me to do any Self-Study. I gave many Interviews ,but I failed to crack any of them.

I don't think that I did anything wrong by leaving that Job(None of the Employee love working there). I prefer not to work, then working at some alpha-beta Technologies.(where there is no carrer Growth). It's good to leave those companies and prepare for some product-based Company.

You don't know which round you get rejected. Google always conduct all 5 interviews and then decide whether to hire you or not based on results of all 5 interviews.

Also recruiters who told you to practice on CF / TC is wrong. They are also not the ones who make decision whether to hire you. Leetcode or whatever sites with real interview questions are much better for preparation.

Doing a job is worth to get a better job. CP does not affect your job skills.

But I can say the opposite is true to some extent. On a low level of CP, your job skills do affect CP skills. Most of the good non-competitive programmers I know would have got blue rating from scratch if they started CP. Any random programmer with 5+ years work experience would have got blue rating. Because they know how to create programs in general, how to organize code, how to write reliable and easy to test and debug programs.

So if you are looking for a job, go and write some web service / DB application / library / whatever instead of wandering here.

Well, you have gained rating from last two of your contests. It depends mainly on what you're trying to achieve. If you are seeing this as some casual fun, like some people (maybe you're in that set as well) like to play basketball once in a while without the need to become extremely good in basketball, then why bothering about the rating. If you're trying to prepare for IOI or something like that, then you should practice mostly those kind of tasks. Performance on Codeforces will more-less correlate with that (although I used to be better even than some of the purple guys from my country on onsites because that style suits me better (not that I have achieved anything better than mere participation on few NOIS)). Of course if you want to be good at Codeforces, that should be your main platform (along with studying theory). And last, I know I am really not good or experienced, but I doubt even the "redest" of guys could give you any advice more valuable then: practice more. Ask someone you know like your more knowledgeable pal or your teacher to be your mentor and keep your progression, they could probable know about your strengths and weaknesses than guys here who don't know anything about you.

For a long time I thought I'm not suitable to do CP because the results always disappointed me. But the truth is I didn't work hard enough and my practice method was not efficient. It's fine if you quit because you don't like it, but escaping cannot solve any problem. If your situation is same as mine, I suggest you stay and face it, because same thing could happen again if you keep running away from it.

There is no one size-fits-all advice other than "practice" which is so obvious it is basically not saying something at all.

I would suggest you look for answers for yourself, and not expect other people to tell you what to do. Because what works for them might not work for you, and other way around.

For example, I find most my solutions intuitively, but suck at making necessary abstractions/jumps of logic/reframing the problem in a useful manner. So I stopped doing CP for awhile and did some math, now I can see some solutions much more clearly. What you should do depends on your current situation.

If you understand the meaning from a problem, but you have no idea to write the code or what kind algorithm to solve it, i suggest you to read the other competitor code (you know the link is ?). That is very useful.

If you stuck in C problem. Then, try my suggest above. But, if you don't understand the meaning of the problem, the problem is "maybe" not for you and find another problem that you understand.

I always remember that i have to "always on edge", i mean, always solve the problem you can understand, but you can't write that code/ what kind of algorithm to solve it.

I think asking this question is the last thing that will help you. To begin with, everyone will give you a different answer. I might recommend you to upsolve, others to read books, but that's because every one of us will base on what helped us improve personally in the past. Everyone has different skills and abilities. Therefore, everyone has a different trajectory on how they became good.

I invite you to start writing your own story. Take some time to reflect on your strengths and weaknesses, and based on that, choose what the best strategy is for your own, personal improvement. If you try it and feel it is not working, be introspective to find why, and reorganize it. But note that all this can only be done by you, no one else.

Don't misunderstand, this doesn't mean you shouldn't ask for help. But do it like an adult, such as asking for ideas on a contest blog, or reading other people's codes in practice, etc. Don't go desperately complaining that you aren't getting results. Be mature, calm down, think why you're not achieving your goal, and act on that.