Beginner in programming(need help)

I’ve just started programming on codechef , please help me from where to start and how to start. I only know the basic logic and is able to solve to only 1 or 2(max) in any contest. I’m demotivated with it and seek some kind of help and guidance regarding my start to programming jouney.
Please help me out.

DISCLAIMER: I’ll be focusing on improving in short contests in my comment, as Long challenges are prone to cheating, use of online resources (this is positivie part, not the negative), the problem difficulty fluctuates between easy and impossible and I personally don’t have experience doing them myself, so I can’t give you many tips on how to get better at them.

First things first, you should not be demotivated by your performance. Most of us started this way (in the first 7-8 contests on CodeForces, I could sovle 0-1 problem at most). As the time passed I’ve started to improve and that’s how most people do. Inexperienced people or ones with low confidence levels looking at my rating graph here on CodeChef may think that I’m super talented or something, but reality is I’ve had some training before and that’s the case with most people that sky-rocket to 4* in 3-4 contests or 5* in 4-5 contests.

You should understand that improvement won’t come on its own and that you’ll have to put time into brushing up your skills. Many pepole make the mistake of practicing on SPOJ or UVa judges, and let me tell you one thing - if you want to improve your CodeChef rating - practice on CodeChef. If you want to improve your CodeForces rating - practice on CodeForces. Problems differ in their type on different platforms.

The way I’d go about it is by upsolving older contests - meaning pick previous Lunchtime, solve it problem by problem and when you get stuck, seek the editorial. (you should be able to understand at least 3 problems’ ideas. If you don’t understand the idea used in the problem, read about it online.

Don’t stop at 3 problems though, read the fourth problem and try to understand the editorial. In case you see lots of things you don’t understand, it’s probably not worth trying to implement it as chances are your knowledge level is far below what’s required for that particular problem. That’s fine, because by practicing you’ll be able to solve it in month or two! :slight_smile:

To reach 4* or even 5* you’ll need to solve 3 problems quickly in a short challenge. This implies some decent understanding of arrays, binary exponentation, sieve of erathostenes, binary search, finding primes in O(sqrt(N)), stacks and some logical reasoning skills. Yes, it’s all you’ll need to hit 2000 rating, provided you take enough contests and solve quickly.

This is a thing most people miss in short contests, speed is very important. Even though I solved just 3 problems in the last two contests I took part in, I was amongst the very first people to solve them and thus reserved a decent place in contest. Had I solved a problem 40 minutes later, my rank would have decreased from 114 to 600, which is quite a big hit.

This goes to say that ratings and stars don’t have a huge meaning behind them (ofc the greater number the better), but there are many 3* and 4* coders of similar level, just like 4* coders of similar knowledge as 5*.

But this does not mean you should focus on speed only. I’d say being the slowest person to solve 4 problems is much better than the quickest one to solve 3 problems, although they share almost exact rank.

To conclude, put the time into solving previous contests. Don’t learn algorithms outside of solving problems (this is the biggest mistake you can make, as you won’t actually force yourself to come up with the idea of using that algo on your own). Never skip contests and don’t be afraid to lose rating, when you truly reach the desired rating you won’t be falling below it anymore, until then consider yourself as being lucky in a contest.

I hope this helps and gives you the basis of what to do! :slight_smile: