Starting Competitive programming - Steps and Mistakes



In this blog, I describe the steps to start competitive programming for a person from any level and I point out several common mistakes, so that you can easily land a job at a top company!

Key steps to avoid mistakes during your Competitive Programming Journey:
  • Learn English, Maths and Typing
  • Learning programming language
  • Learning data Structures and algorithms
  • Improving through Constant practice
  • Help and Teach others
  1. learning English, Maths and Typing:
  • Learning English is very important for better understanding of contest problem.As proper understanding of problem is leads to better solution.
  • Competitive Programming (CP) doesn’t typically require to know high-level calculus or some rocket science. But there are some concepts and tricks which are sufficient most of the times. You can definitely start competitive coding without any mathematical background. But maths becomes essential as you dive deep into the world of CP. A majority of the Competitive Coding problems that you’ll encounter will have some mathematical logic or trick. All the algorithms that we learn are derived from a mathematical point of view. Most of the times, maths helps us solve the question within the necessary time constraints.

  • Learning Touch Typing is also important skill in competitive programming.Touch typing (also called touch type or touch keyboarding) is a style of typing. Although the phrase refers to typing without using the sense of sight to find the keys—specifically, a touch typist will know their location on the keyboard through muscle memory—the term is often used to refer to a specific form of touch typing that involves placing the eight fingers in a horizontal row along the middle of the keyboard (the home row) and having them reach for specific other keys. (Under this usage, typists who do not look at the keyboard but do not use home row either are referred to as hybrid typists.) Both two-handed touch typing and one-handed touch typing are possible.
Note: Here is the link to learn touch typing 
2. Learning Programming language :

At the moment, the most popular programming languages used in contests are C++, Python and Java. For example, in Google Code Jam 2017, among the best 3,000 participants, 79 % used C++, 16 % used Python and 8 % used Java [29]. Some participants also used several languages. Many people think that C++ is the best choice for a competitive programmer, and C++ is nearly always available in contest systems. The benefits of using C++ are that it is a very efficient language and its standard library contains a large collection of data structures and algorithms. On the other hand, it is good to master several languages and understand their strengths. For example, if large integers are needed in the problem, Python can be a good choice, because it contains built-in operations for calculating with large integers.Still,most problems in programming contests are set so that using a specific programming language is not an unfair advantage. All example programs in this book are written in C++, and the standard library’s data structures and algorithms are often used. The programs follow the C++11 standard, which can be used in most contests nowadays. If you cannot program in C++ yet, now is a good time to start learning.
C++ code template A typical C++ code template for competitive programming looks like this:

3.Learning Basic Data structure and Algorithms:

If you are already well versed with the basic data structures like ArraysLinked Lists etc. and some of the basic algorithms like SortingSearching etc. then you will comparatively take much less time than a complete newbie as you already know the basics. For example if you even don’t understand the programming example mentioned at the start of the article then you have a long way to go.
It also depends on the purpose for which you want to improve your knowledge of Data Structures. Some people learn them for job interviews, some for competitive programming and some for gaining knowledge. If you are preparing for Job Interviews then you have a limited set of Data Structures to learn which are most commonly asked in the interviews, if you want to become a good competetive programmer then you will have to focus on complex data structures like Segment TreesFenwik TreeBinary Indexed Trees etc.


4.Improving through Constant Practice:


The best strategy to improve your competitive programming skill is to practice a lot, but you must solve gradually harder problems, not just the easy ones. Get out of your comfort zone and challenge yourself. For example, if you solve problems on Codeforces:

  • Sort by number of people who solved it.
  • Start with page 1
  • Solve some problems. If you feel you can solve them in like 5-10 mins, immediately ignore the other problems, move on to page 2
  • Continue until you feel challenged (e.g. need like an hour to solve / can not solve at all / ...).
  • Try really hard, but if you fail, look at editorial, ask for solutions, ...

Here are Some Contest Sites:

Here are the best sites that host competitive programming contests, and provide contest platforms to practice old problems.

Codeforces

It is a Russian site, that provides high-quality contests with the highest frequency, sometimes up to twice a week. It features a blog system where you can ask questions and a practice problemset, which you can sort through with tags. It also has virtual contest support, and the ability to create groups to organize private contests.

Topcoder

It is a US-operated site, that hosts 1.5-hour SRM's (Single Round Matches). Topcoder also organizes the annual Topcoder Open tournament. It also hosts the TopCoder data science tutorials, a list of tutorials written by respected Topcoder members. One of the features that separate it from other sites is a separate challenge phase after contests.

HackerRank

HackerRank is a technology company currently based in the US, that focuses on competitive programming challenges. It hosts HourRanks, CodeSprints, 101 Hacks and Week Of Code contests on a monthly basis. It has learning tracks for various CS topics and programming languages.

CodeChef

It is an Indian site, that hosts 3 contests monthly, the Long Challenge (10-day challenge) and the shorter Cook-Off and Lunchtime Challenges. The Long Challenge is one of the best starting points for a beginner programmer, as it allows you to learn new concepts to solve problems competitively. It also organizes an annual flagship coding competition, the CodeChef SnackDown.

HackerEarth

HackerEarth is also an Indian company focusing on competitive programming and hiring challenges. It conducts the monthly Circuits, which are 9 day long challenges, as well as shorter challenges (HourStorms). It also hosts competitions conducted by various colleges around India.

Hacker Blocks

A problem archive organized by Coding Blocks, it hosts a large number of problems categorized by type. You can join contests with leaderboards, and race your way to the top. The practice section also contains innumerable problems categorized by type. You can also join its classroom or online courses, and get access to a community to help you when you get stuck with personalized support.

CSAcademy

It is also a relatively new site that hosts regular 2-hour programming contests. It also supports virtual contest participation, and its interface involves features like a graph editor, geometry tool and a difference checker tool.

AtCoder

AtCoder is a Japanese programming contest site for anyone from beginners to experts. They hold weekly programming contests, of various difficulty levels (Beginner, Regular and Grand contests).

5.Help and Teach other:


This step is totally depend upon the individual he wants or not.In my case it helps me a lot ..........

Conclusion:

So to master the Competitive Programming you need dedication, patience and continuous practice to solve the problems as many as you can.

Code,sleep,eat and repeat.

Enjoy Coding !

~Kuber Khandelwal



































































Post a Comment

0 Comments