How to learn competitive programming: If you are a programmer or a level-up coder. then you should familiar with the word called competitive programming. and if you want to become a competitive programmer and don’t know how to learn competitive programming. then you are in right place.
I am also a competitive programmer and I started my journey to become a competitive programmer in the middle of 2017. and I think I have that much knowledge so I can give you the way that how you can start with competitive programming.
So this is my way which I prefer that you should follow to learn competitive programming. I divided my words so you can easily follow the things which I recommended. and you should follow these steps if you want to become competitive in programming.
Steps to becoming a competitive programmer.
- Pick up a programming language
- Learn data structures
- Learn Algorithms
- Hands-on practice
- Follow cycle
Before we started if you don’t know what is really competitive programming. then you should read my last post where I define the whole terminology of competitive programming. this will give you the proper idea that what is competitive programming and whether you really need to learn competitive programming or not.
So let’s start with our main topic…
Programming language for competitive programming.
If you really want to learn competitive programming then you should have proper knowledge of at least one programming knowledge. I think everyone has their own favorite programming language.
And after picking a language in which you are comfortable coding. then start learning this language from basic to advance.
let’s say I started with Python then I first learned basic things about what is python and in which areas Python is used. how many versions are available currently in the market? and what libraries are used in Python and what is the use of all these libraries.
After that, I started learning to code in Python. I start with the basics like first, I learned about loops, statements, variables, operators, lists, dictionaries, and other things as well. at the same time, I also practice code with my own hands.
And then I jumped to the advanced topics in Python like how to use files and graphics using libraries and how to use other external tools like Github, and how to work with other programming languages like working with an XML file with Python, and soon…
It took me 1 month to learn the whole Python programming language. and trust me a programming language never ends. so every day I learn new things in Python.
Data Structures for competitive programming
After picking a programming language. you should need to learn data structure in the same language. let’s say that I choose Python and after sufficient knowledge of Python. I started learning data structures in Python.
One thing I want to clarify is that here I only mean with data structures, not with algorithms.
in data structures, I learned about lists, stacks, queues, heaps, trees, and graphs. and implement these things using the Python programming language.
Using data structure I got the initial knowledge about what is stack, queue, heap, tree, and graph. and this process took me an extra half month to complete it. then I jumped over the algorithms.
Algorithms for competitive programming
After learning the general introduction to the data structure and learning about how to implement these things in one of my favorite programming languages which is Python. and then I started with the algorithm.
In the algorithm, I started learning how to perform the operations on the data structures like how to insert, deleted, sort, and merge link lists, queue, heap, tree, and graph. and implement these operations using Python programming.
So after learning algorithms, I started using the data structures and algorithm techniques in my code.
so that results in me that how to handle complexity in the program. and how to make a solution to a bigger problem with the minimum line of code. and trust me this gives me a lot of confidence that how to handle coding problems and solve them in a minute. and this is real competitive programming.
because competitive programming means how we can minimize the resources that are used by our code with our experience. like if a program takes 100 bytes of memory and 10 seconds of time to run then using competitive programming we can minimize the memory size and time-space used by the program.
Practice programming skill
After learning data structures and algorithms in a particular programming language and having sufficient knowledge that how to use these techniques in our code. you need a very special and important thing which is practice-practice-practice…
because practice makes perfect.
So there is a number of websites where you can make your account and start practicing in your particular topic. like if you are not good enough in data structures then you can go to the hacker rank website and start solving problems on data structures.
this is one of the most important things. and nobody can tell you about this. if you really want to be good at competitive programming then you should follow the whole cycle. because when I finished my practice. I realize that there are some topics in which I was not good.
And also there are numerous topics in Python that I was not touched on at a single time. so I follow back the process and start learning the things which I was left with previously.
And trust me I follow back the whole cycle so many times. and this makes me good and better every day in competitive programming. so this is the way I follow to learn competitive programming. you can also join me and start learning today. if you do then comment me with yes or no then never mind. good luck with your journey.