Codementor Events

How I learned Competitive programming

Published Apr 08, 2020

About me

I am a final year student at BVCOE, New Delhi. In the first year, I didn't know much about coding except some names of the languages. My goal was always clear whatever you learn, learn properly otherwise please don't learn at all. After these 4 years i have earned a lot of experience and able to make good projects.

Why I wanted to learn Competitive programming

From childhood math have always interested me and i loved to do it for hours. Same thing happened when i did my first question on hacker-rank after learning some basics of c++. I was loving to think a lot and lot to solve a single question i kept doing it until a point when my knowledge of a language was not enough to solve further problems. The thought came to mind that i can know a language in 1-2 days and logic behind every language is same that is important to learn which can be learnt only by doing practice. So instead of learning many i focused on a single language and Started practicing problems.

How I approached learning Competitive programming

I got to know that to practice many problems i need to know a language, data structures and algorithms very well. So i started with data Structure in c++, i learned arrays, stack, queue, linked list from the basics and started implementing them by my own. I am implemented them 4-5 times so i don't need to think much while writing the code. Then came the tree part, Btree, B+tree, postfix, prefix and all, this part require time and patience and looked at its implementation and then tried my own this part requires a lot of practice as this is the most important and difficult part. Then i started with recursion, greedy algorithms, time complexity, dynamic programming, shortest path problems, this all became easy as i gave enough time to data structure. Then i started practicing on hacker-rank.

Challenges I faced

Trees are difficult to imagine and implement. At first recursion was not imaginable you need to believe that work from second step will be done automatically you have to do only the first part.

Key takeaways

At first you will find more difficulties in coding and all can be removed only with practice. I enjoyed a lot because i was think 100 solutions for solving single question which came in work to solve next questions.

Tips and advice

keep practicing, don't loose hope. At a certain point you will fall in love with coding.

Final thoughts and next steps

Every big company asks Data structure and algorithms in depth while hiring a fresher. So Competitive programming is so important to start a great career. Keep revising ds and algo and keep practicing.

Discover and read more posts from bhavesh bansal
get started
post commentsBe the first to share your opinion
Show more replies