A Guide To Being A Competitive Coder At DA-IICT
In this blog Nishant Shah, B.Tech 3rd-year student and Convener of the Programming Club at DA-IICT shares his experience in Competitive Programming. It will also be helpful for someone who wants to begin with Competitive Programming and excel at it. Currently, Nishant is ranked Top 17 in Codeforces and Top 30 in CodeChef in India. He also achieved global rank 5 in Google Kickstart Round G 2020.

A Complete Roadmap

What is Competitive Programming?

Competitive Programming (Also referred to as CP) is about problem-solving, a “mind sport” in which the contestants have to solve the problems and write a computer program of the solution. In simple terms, it is about solving logical and mathematical puzzles and then writing a code that simulates the process of solving the puzzle. It is required that the program produces the correct solution of the described puzzle and executes under the given time and memory limits.

A way to practice; from Novice to Expert:

Get Started

The first step into Competitive Programming is to learn a programming language. It is good to learn the C language in the beginning as it is easier. C language is also taught in the first semester’s programming course at DA-IICT. After going through some of the basics of the language, you can start solving problems from the “Problem Solving” section on HackerRank. I recommend for beginners to start with HackerRank. It has a decent number of problems placed in a well-defined manner according to the tags & difficulty.

Programming Club sessions at DA-IICT will also help you to learn the C language and build logic for basic problems. It is of utmost importance that you learn about the syntaxes, built-in functions, and library functions such as STL in C++, Big Integers in Java, etc. C++ is very similar to the C language. It has some useful libraries that make the implementation of Algorithms and Data Structures easy. Also, C++ will be the language that you will be using in Programming contests. You can learn it through any online resources.

Nearly every coding problem will require the use of a specific Data Structure or Algorithm (DSA) for an optimal solution. Knowing basic DSA techniques before you start is a must; DSA make programs more efficient. Know some basic Algorithms like sorting, searching, number theory, etc. You can also learn DSA through CodeMonk Tutorial on HackerEarth.

2. Enter the Competition

Start competing on an online platform such as AtCoder (Atcoder Beginner contests) and Codeforces, (Division 3 contests). After solving a good number of problems (around 100 to 120), you will start understanding the nature of problems and implement your logic into code without much effort. In the beginning you may feel that the problems are tough and that you are not made for it or your thinking ability is not much higher to solve these questions.

The reason is as a novice you just see the syntax of the language and some basic loops or function; consequently, you need to continue taking part in contests. When you get stuck on any problem, you can check out the contest’s editorials and discussion forums and learn how the problems are solved.

3. Programming Contests

Take part in various online coding competitions where you can learn about different coding style and learn about areas where you need more practice. By correcting our mistakes & failures, we ultimately help ourselves make that long leap to success. For example, take part in CodeChef’s monthly long challenges, where you will learn many advanced Algorithms and Data Structures. Programming contests are fun and exciting and it forms the “Competitive” part of CP. Programming contest is a real-time competition among competitive programmers worldwide, who compete to solve the same set of problems in the given time duration (generally, 2 to 3 hours). The participants are ranked according to the number of problems solved and the time taken by them to solve the problem. In many of the contests, there are various rewards for the top contestants. Some of the most popular ones are Codeforces, Atcoder, CodeChef, TopCoder, Facebook HackerCup, Google Hash Code, Google Kickstart etc. The ICPC, formerly known as ACM-ICPC (Association for Computing Machinery — International Collegiate Programming Contest), is considered as the “Olympics of Programming Competitions.”There are many helpful resources available online for free like CP-algorithms, CSES, Codeforces blogs where you can learn about the nitty-gritties of competitive programming.

Why has Competitive Programming gained so much importance?

Problem Solving skill is vital for engineers. Problem-solving and critical thinking are the primary skills that competitive programmers develop through solving problems. By taking part in the contests, you learn to focus, write efficient and compact code, learn good implementation skills, minimize the code’s errors, and quickly debug the mistakes. With a sufficient amount of practice, intelligence and coding improves a lot. Competitive Programming is also helpful in clearing coding and technical rounds in many of the top software companies. Employers highly value skills gained through Competitive Programming because competitive programmers own the raw talents and skills to be one of the best engineers. Competitive Programming develops creativity and patience as we spend countless hours for problem-solving and we have a constant desire for perfection, which is necessary for success.

My Journey of Competitive Programming at DAIICT:

I hardly knew about programming when I joined DA-IICT. After joining the college, we had the Programming Club’s orientation, in which I got to know about Competitive Programming. I also saw many posts on quora mentioning the great coding culture at DA-IICT and its performance at the world level. I found it very interesting, and it was also well appreciated, so I decided to give it a try.

Nishant and his team during ICPC regional round

I started by learning the C language from the textbook, and after having enough of it, I started solving basic problems on HackerRank (the only platform I knew at that time). Since laptops were not allowed in the first semester, I used to go to the Digital Library and practice there along with some of my batchmates. We also had sessions of “Programming Hours” in the computer lab, where the seniors taught us programming concepts. This cycle of learning and competing among the batchmates was really exciting, and I was determined to go deeper into it.

In my first-year winter break, I got to know that solving basic programming problems on HackerRank wasn’t enough, and it is necessary to learn some Data Structures and Algorithms to solve tough problems. I began learning those from the CodeMonks tutorial in HackerEarth. In the meantime, I also realized that C language is not sufficient to implement these algorithms and that competitive programmers use C++ because of its wide range of libraries, which makes it easier to code. In January 2019, some of my batchmates decided to start competing in live contests on CodeForces. It was the first time I took part in a rated contest. During my summer break, two of my seniors, along with me, formed a team for ACM ICPC. We spent around a month in the college in the summer vacation, learning advanced algorithms and practising for ACM ICPC. That was the time when I learnt most of the things of CP. The ACM ICPC online round came in September 2019, and my team got selected in two regionals. Our hard work seemed to pay off, and it boosted me to practise more rigorously, and I kept taking part in various contests, learning newer topics, and of course, practising problems.

Nishant Shah

Your patience, commitment, and uniformity are very important to become a good competitive programmer. Keep practising the coding questions every single day on these platforms. DA-IICT provided me with a community of like-minded people who have different skillsets in coding. Moreover, India is turning into a digital and start-up hub, and coding skills are just starting the in-demand climb.
['Da-Iict Blog']
['Codingbootcamp', 'Coding', 'Programming', 'Competitive Programming']