Hello and welcome to this repo. In it, I will be adding how to become a good competitive programmer from scratch.
Who am I? I am Shlok a 5 Star Coder on CodeChef with a global rank of around 250 and an India rank of around 150 and my Max rating is 2182. On LeetCode I am in the top 7% of the coders and have solved more than 1100 questions.
My profiles: CodeChef: https://www.codechef.com/users/shlok_t LeetCode: https://leetcode.com/u/shlok_t/
So now let's get started :)
Becoming a good competitive programmer requires dedication, practice, and a strategic approach to learning and problem-solving. Here are some steps and tips to help you on your journey:
- Learn a Programming Language: Choose a language that's commonly used in competitive programming, such as C++, Python, or Java. C++ is often preferred due to its Standard Template Library (STL) which is very useful.
- Understand Basic Data Structures and Algorithms: Make sure you are comfortable with arrays, linked lists, stacks, queues, trees, graphs, hash tables, and basic sorting and searching algorithms.
- Join Online Platforms: Websites like Codeforces, CodeChef, LeetCode, AtCoder, HackerRank, and TopCoder offer a wide range of problems and contests.
- Solve Problems: Start with easier problems and gradually move to more difficult ones. Consistency is key, so try to solve a few problems every day.
- Dive Deeper: Study more complex data structures like segment trees, Fenwick trees, tries, and disjoint-set unions (DSU).
- Algorithms: Learn about dynamic programming, graph algorithms (like Dijkstra's and Floyd-Warshall), backtracking, and bit manipulation.
- Regular Contests: Participate in regular online contests on platforms like Codeforces, CodeChef, and AtCoder. This helps you get used to the competitive environment.
- Virtual Contests: If you miss a live contest, many platforms allow you to participate in it virtually later on.
- Contest Analysis: After each contest, spend time analyzing your solutions as well as the top solutions. Understand where you went wrong and how you can improve.
- Debugging: Develop strong debugging skills. This will help you quickly identify and fix issues during contests.
- Books: Consider reading books like "Competitive Programming" by Steven Halim and Felix Halim, "Introduction to Algorithms" by Cormen, Leiserson, Rivest, and Stein, and "The Art of Computer Programming" by Donald Knuth.
- Tutorials and Blogs: Follow tutorials and blogs by experienced competitive programmers. Many top coders share their strategies and solutions.
- Forums and Groups: Engage with communities on platforms like Codeforces, Reddit, or Discord. Discuss problems, solutions, and strategies with peers.
- Mentorship: If possible, find a mentor who can guide you and help you improve faster.
- Timely Practice: During practice sessions, time yourself to simulate contest conditions.
- Prioritize Problems: Learn to quickly identify which problems to attempt first during a contest. Start with the easier problems to secure quick points.
- Learn New Techniques: Competitive programming evolves, with new techniques and algorithms constantly emerging. Stay updated with the latest trends and techniques.
- Adapt: Be flexible in your approach to problems. Sometimes unconventional methods or creative thinking can lead to solutions.
- Healthy Lifestyle: Ensure you get enough rest, exercise, and maintain a healthy diet. A fresh and focused mind performs better.
- Avoid Burnout: Take breaks and avoid over-practicing. Quality of practice is more important than quantity.
- Online Judges: Codeforces, CodeChef, LeetCode, AtCoder, TopCoder, HackerRank, SPOJ, UVa Online Judge.
- Books: "Competitive Programming" by Steven Halim and Felix Halim, "Introduction to Algorithms" by Cormen, Leiserson, Rivest, and Stein, "The Art of Computer Programming" by Donald Knuth.
- Websites: GeeksforGeeks, HackerEarth, CP-Algorithms, TopCoder Tutorials.
- YouTube Channels: Gaurav Sen, William Lin, Errichto, Kunal Kushwaha, CodeNCode.
By following these steps and utilizing the resources mentioned, you'll be well on your way to becoming a proficient competitive programmer. Good luck!
Resources:
- Introduction to Algorithms by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein
- Good Github Repo: https://github.com/kunal-kushwaha/Competitive-Programming-Resources
- https://codeforces.com/blog/entry/109430