Programming is fun, programming is an exercise of your brain, programming is a mental sport and when this is held over internet involving sport programmer as a contestant it is called Competitive Programming. A programming competition generally involves the host presenting a set of logical or mathematical problems to the contestants, and contestants are required to write computer programs capable of solving each problem. Judging is based mostly upon number of problems solved and time spent for writing successful solutions, but may also include other factors (quality of output produced, execution time, program size).
Why you should do Competitive programming?
You loves sports right? Competitive Coding is a sport. Once you started solving some problems your confidence will increase and gradually you are going to love it. There are different stages in this game and once you successfully completed the beginner level you will always have eager to go to the next level.
It’s a mind game and playing this for sometimes you realize that your thinking ability increases gradually. Passing the different test cases your thinking ability becomes wider, you started thinking about all the possible outcomes of any problems.
There are a lot of big companies like Google, Facebook, Microsoft, Amazon hires through competitive programming so if you want to get into these companies then you really need to do competitive programming.
How to prepare yourself for Competitive Programming ?
Choose a Programming Language : Firstly, you need to choose a programming language that you are most comfortable with and learn its syntax. It can be anything C, C++, Java, Python or any programming language.
Understand the concept of Time and Space Complexity : In most of the cases there is more than one solution that exists to a problem so you need to come up with the best solution i.e optimal one. So it’s really important to learn about these two concepts to write an optimal solution for the problem.
Learn the Fundamentals of Data Structures and Algorithms : DSA is the heart of programming and you can ignore it while solving coding problems in competitive programming. Array, Linked list, Stack, Queue, Tree, Sorting, Recursion, Dynamic Programming all these basic building blocks of DSA will help you to become a good programmer.
Take the challenge and Solve Coding problems : You need to take part in coding challenges on different coding platforms. Before participating in contest it would be great if you practice for some challenges on your own and then participate here. If you are looking for the resources of these coding platforms so a lot of sites are there like Codechef, Codeforces, Topcoder.
Practice and Do it Regularly : Your patience, dedication and consistency are very important to become a good competitive programmer. Keep practicing the coding questions every single day on these platforms or you can also take the help of whiteboard to solve coding questions but the important thing is to do it regularly.
Programming really needs a lot of patience, so don’t get discouraged of DO NOT GIVE UP IF YOU GET WRONG ANSWERS. This is the point where most of the people lose interest in programming. Keep trying for a day, week, months If you can’t find a solution google it, ask for help if you don’t get the topic, read the various approaches that coders took to solve the problem but don’t quit. You will start improving day by day only and only if you maintain your consistency and don’t stop.
“ The biggest mistake programmers make is probably getting discouraged and not practicing enough. Or practicing only on problems they feel they are good at.”
- Derek Kisman, aka SnapDragon