The most common question regarding Competitive Programming is where do I start? Let me build this for you step by step:
Step 0: Learn a Programming Language
You can learn any programming language of your choice, but better to be preferred are C++, Java, and if you find Python suitable, you can go for Python.
Why C++ or Java is preferred?
In competitive programming, we have something call runtime execution of programs. Specific problems have solutions in particular runtime. C++ beats every language with the best runtime.
If you consider the speed of C++ as x, Java is 2x, and Python is 5x.
Also, if you get the question, how much should I know in any programming language for starting problem-solving — Bare minimum.
By bare minimum, what I mean is you should know conditions, loops, arrays, hashmaps.
Now how to do this bare minimum thing? –
C++ — https://www.hackerrank.com/domains/cpp
Java — https://www.hackerrank.com/domains/java
Python — https://www.hackerrank.com/domains/python
Suggestions — You can start with any language of your choice but suggested to shift to either three of the languages as they provide a lot of community support as well.
Step 1: Choosing a platform to start for practice
The best platform for starting with problem-solving is Hackerrank.
Hackerrank provides you with some of the best problems set to go from base level to medium level. Let me link you with the problem set you should start.
Hackerrank Problem set — Algorithms
Data Structures — https://www.hackerrank.com/domains/data-structures
Don’t worry about the Algorithms or the Data Structures words. We will talk about them all.
Step 2: Looks like you got stuck.
Now you would want to know what Data structures and Algorithms are — leave it will inform you later in the journey — now having done Hackerrank enough till you got stuck, let’s move onto a new platform!!
HackerEarth — Best platform for learning problem solving based on topics.
How to start solving HackerEarth?
- Go to the Practice section and start solving Basic Programming.
- The Basic programming section has six sections. Before starting problem-solving, first, go through the theory section of each part.
- Try solving Easy, Medium questions here for now as Very-Easy are too easy now since you have done hackerrank.
- Solve around 100 questions from this Basic Programming section.
After this, get back to Hackerrank and start doing the problems where you were stuck.
In all the practice at HackerEarth, if you get stuck, follow up with their editorials.
Step 3: Looks like again stuck. err everywhere
Now its time for you to have some experience of CODEFORCES
Codeforces is the best platform for any competitive programmer to be on!
Solve all the problems from the below list:
Step 4: Data Structures and Algorithms
Till now, you have used arrays, Hashmaps, stacks, queues. These are called Linear Data Structures. There are non-linear Data Structures as well known as Trees, Graphs.
These are helpful as they provide storing of data in a particular format, which helps us to implement the algorithms quickly.
Algorithms are methods or say the way you implement your solutions or techniques on how you build upon solutions for any particular problem.
Geeks for Geeks gives some of the best articles to learn Data Structures and Algorithms.
Don’t try to read every article from the start itself but when you need it.
Let’s say you are stuck, and you are not able to find any way to solve it first go through the editorial and go through relevant GFG articles later.
Step 5: Enough Practice now Contests!!
After doing practice of these many problems, you are good to go with contests. For contests start doing HackerEarth and CodeChef
Start with the Long contests for the initial 3–4 months. HackerEarth has long contests of the name Circuits (for, example March Circuit for March month), and also CodeChef has Long challenges. Both last for 10–15 days each and have almost 7–8 problems each. This problem ranges from very to very tough. In the initial, you can feel low because of not able to solve problems, but don’t lose hope and continue.
1. Machines Demonstrate Self-Awareness
2. Visual Music & Machine Learning Workshop for Kids
3. Part-of-Speech tagging tutorial with the Keras Deep Learning library
4. Artificial Intelligence Conference
Suggestions — CodeChef Long is excellent for Long challenges and has two sections Div 1 and Div 2; try to solve all problems in Div 2 after contests. They teach a lot. CodeChef Editorials are some of the best editorials being very detailed.
Step 6: Short Challenges
Don’t leave Long challenges ever. But improving speed is also essential for you to excel in contests. Codeforces and Codechef here are the best sources of short problems.
Codeforces has a frequency of almost one contest in 3 days, and for CodeChef its two contests in one-month called Lunchtime and Cookoff.
Compete Regularly on these platforms, and you will now definitely have a change in your coding IQ.
There will be many times you would not be able to solve questions. Upsolving them is where your learning will happen, as this will make you to do stuff you are not comfortable with. HackerEarth has Algorithms, and Data Structures challenges every month, try to attempt it as well.
Atcoder has Begineer contests aimed at beginners level. Beginner contests are great and also full of concepts.
Step 7: Solve Daily
Try to solve questions at least daily and also learn a new concept every day, be it from the HackerEarth theory section and Codeforces blogs, GFG.
These are the only steps you need to follow for a start. Don’t mess up with too many resources, as this will hamper you. Follow this article, diligently, and you will observe quick and effective changes in your ratings and your coding skills. We will follow up with other great articles on how you can go forward on to winning contests and many more things.
Follow the post till then.