Roadmap for beginners  to  Competitive programming
Tags: computerscience, programming, coding, algorithms
Published: 2021-03-17 13:57:33

# What is Competitive Programming?

It's basically a mind-sport where you are given a problem and you have come up with optimized solutions for given constraints with your coding skills. This helps in building our logical thinking and analytical thinking skills and most importantly your data structure and algorithms knowledge.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hki0zg4pdzztwgy6nftx.png)
### Learn a language 

**1:** The most preferred language used in competitive programming is C++, Java. I prefer C++ always because it is flexible, very fast. C++ has many  Data structures and Algorithms built-in library which makes it easier while coding.

**2:** Java This language is also used widely in programming but one drawback is it is not suitable for beginner programmers because it is longer code to write and not beginner-friendly.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gg8i67mru9984ltzr4gx.jpg)
### Practice basic problems from these sites.
**Hackerrank**

I think this will be one of the best beginner-friendly websites for practicing basic problems. here there a wide range of problems from beginner to advanced. Even we can practice in different languages C, C++, Java, Python, etc...

**HackerEarth**
HackerEarth is an Indian company focusing on coding problems and hiring challenges. Even this platform provides good beginner-friendly questions. Here there will monthly contest held where you can participate. this website has tutorials for all practice topics. It hosts competitions conducted by various MNC's and Colleges 

I think these two websites are more enough for practicing basic questions. 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p0l16txfiwwxmym5ihns.gif)

### Learn Data structure and Algorithms 

Once you are done with the basics of coding and practicing it then it's time to learn **Data Structure And Algorithms**.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4al9ndrvyq8vq2f9bdxb.jpeg)

This is the most important thing that should be learned and practiced. Having good knowledge of Ds&Algo will make up a more optimal solution for the problem we are trying to solve. 

### Important Data Structures and Algorithm Topics:
    * Array
    * Stack
    * Queue
    * Linked list
    * Tree's
    * Graph's
    * Hash table's 
    * Trie's
    * Dynamic Programming 
    * Divide and Conquer 
    * Backtracking
    

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ir8bjf3grjggk9x932n.png)

### Pratice..Practice...Pratice....

Next is completely based on your practice to be master in competitive programming."**The more you practice the more you get stronger**" 

There are different websites you can practice competitive programming 

**1:**[Codechef](https://www.codechef.com/)
**2:**[Codeforces](https://codeforces.com/)
**3:**[Topcoder](https://www.topcoder.com/)
**4:**[Sphere Online Judge](https://www.spoj.com/)

### Resources.
**1:** [Introduction To Algorithms](https://www.amazon.com/Introduction-Algorithms-3rd-MIT-Press/dp/0262033844)
**2:** [MIT OpenCourseWare] (https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-006-introduction-to-algorithms-spring-2008/)
**3:** [Cp-Algorithms](http://cp-algorithms.com/)

Even you can go through [GeeksforGeeks](https://www.geeksforgeeks.org/) for additional reference.

Everything cannot be done overnight. You have to be focused on your learning and practicing problems. Just put up your goals, time table and follow through with it. Atlast I would say three words **Take it easy**