competitive programming practice strategy(techique)/ How to practice in Programming ?

How to practice?

Everything below is written with competitive programming in mind, but practicing for coding interviews is similar. Your goal should be to get better at algorithms and data structures.
Solve problems slightly above your level - those that aren't easy for you but you can usually solve them. If you are stuck for 20-30 minutes (an hour in case of harder problems), read an editorial and make sure you understand it. Implement a solution and if you struggled then go read other people's codes - see how they did it easier. Note the word "stuck" in bold. If you aren't out of ideas then you aren't stuck. You can give up only if you didn't do any progress for some time.
Upsolve problems you didn't solve during a contest. Not all of them, just one-two more. Don't try something very hard because you likely won't solve it. You will eventually learn enough to tackle those hard problems.

How to practice a particular topic?

Use Google to find some tutorials and read them. Solve problems on that topic. After a while, go back to solving random problems. You should now be able to recognize similar problems and apply the new algorithm/technique you learned.
For smaller algorithms/techniques, it's enough to solve a few problems to understand it well enough. In case of big topics (categories) like dynamic programming, you should solve tens of problems. But don't spend months on that because you cheat a little bit by knowing what you should use in a problem. When you read a problem during a contest, you don't know its tags/topics. Sometimes the hard part is to come up with what you should use. Recognizing patterns is a valuable skill and that's why you need to mainly solve random problems.

What should I learn next?

Just solve problems. If there is some algorithm you should know, you will eventually encounter it. Then search for some tutorials and similar problems.

What platform should I use?

The platform doesn't matter much but it's good to solve problems with editorials (and public codes of other people). That will make you learn faster.
For beginners, I recommend Codeforces educational rounds and Atcoder Beginner Contests (ABC). You will encounter a lot of standard problems and thus you will learn important techniques. The statements are not convoluted and that's another plus. There are no English editorials for ABC but you can use google translate from Japanese, or you can read submissions by people from the top. Nowadays, ABC has English editorials after a few days, sometimes posted by Geothermal on CF, https://codeforces.com/blog/Geothermal.

How to train for a particular competition (IOI, ICPC, GCJ, etc.)?

Focus on solving old problems from this competition. Don't worry too much about it though. It's still just about being good at algorithms. Solving problems from other contests isn't a waste of time.
For excelling in IOI, make sure you know everything from the syllabus.
To get better in ICPC, you should obviously solve some old team contests with a team. Read more here.

No comments

Most View Post

Recent post

Codeforces Round 971 (Div. 4) 2009C. The Legend of Freya the Frog Solution

  Problem Link    https://codeforces.com/contest/2009/problem/C S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. h ...

Powered by Blogger.