How to get good at competitive programming
Tags: programming, computerscience, beginners, javascript
Published: 2023-12-13 18:24:17

Are you <u>READY</u> to excel in competitive programming and shine in <u>coding interviews</u>, like those at Google, but <u>not sure</u> where to start? 

This blog post will guide you through the PROCESS and help you avoid <u>**common beginner mistakes**</u>.

![Image of competitive programming](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lviujk371mtekn9uj8sa.png)

### Starting with the Basics

#### 1. Language Proficiency
Before jumping into programming, ensure you're **comfortable with English**, as <u>most online resources</u> use this language.

#### 2. Math Skills
Contrary to what you might think, MATH is crucial in computer science (CS). You'll need a good grasp of <u>ALGEBRA</u> and <u>COMBINATORICS</u>, equivalent to the **US grades 8-10 level**. 

Don’t worry about `geometry`, `trigonometry`, or `calculus` for now. 

Basic modular arithmetic and number theory are also important. If you've participated in math contests like MathCounts or AMC, **_you're already ahead_**!

If you need to brush up on these topics, HackerRank’s math section offers excellent practice problems in **number theory, combinatorics, algebra, and probability**.

#### 3. Touch Typing
Boost your typing speed by mastering TOUCH TYPING, where you type without looking at your keyboard. Websites like keybr.com can help you improve. Aiming for **50-60 words per minute** is a GOOD start.

### Learning a Programming Language

#### 1. Choice of Language
Many top competitive programmers use C++. It's _fast and ideal for solving complex problems_. 

However, if you **already know a language**, stick with it until you reach a HIGHER LEVEL. For example, Java can take you far too. 

If you’re a complete beginner, <u>starting with C++</u> is a good idea. Check out online tutorials for the basics.

#### 2. Practice
Once you're comfortable with the basics, practice on platforms like **HackerRank** to SOLIDIFY your understanding.

### Diving into Competitive Programming

#### 1. Problem-Solving, Algorithms, and Data Structures
Now it's time to focus on the CORE  of competitive programming. 

Resources like the _Competitive Programmer's Handbook_ and _GeeksForGeeks’ algorithms page_ are GREAT. Google can also help you find articles on **specific topics**.

#### 2. Practice Platforms
HackerRank is great for PRACTICE, especially its algorithms section. <u>_A2OJ ladders_</u> and <u>_Mostafa Saad’s spreadsheet_</u> offer well-structured problem lists for ALL LEVELS.

#### 3. Contests for Beginners
Start with beginner-friendly contests like **_LeetCode weekly contests_**, **_AtCoder beginner contests_**, and **_Codeforces division three rounds_**.

### Common Mistakes to Avoid

1. **Relying Solely on College Courses**: College courses are more geared towards CS research, not competitive programming.
2. **Reading Too Much**: CP is about active problem-solving, not passive reading. Spend less time _reading_ and more time **PRACTICING**.
3. **Learning Advanced Techniques Prematurely**: Master the **basics** before moving on to complex data structures and algorithms.
4. **Comparing Yourself to Others**: Everyone progresses at their own pace. <u>Focus on your <u>journey</u>, not others</u>’.

### Final Thoughts

Competitive programming is a marathon. Improvement takes time and CONSISTENT practice. 

Remember, this is <u>your journey</u>, so focus on your GROWTH and enjoy the learning process!

> Note: This post was originally derived from [William Lin's](https://www.youtube.com/@tmwilliamlin168) YouTube channel.

---

Stay tuned and visit my [YouTube](https://www.youtube.com/programmingwithshahan) channel for more tips on programming.

Thanks for tuning in, and don't forget to share your thoughts in the comment section below!