r/Btechtards • u/SurgeImpedance Moderator 🛡️ | JU EE '25 • Jul 04 '24
General Competitive Programming resources that I found useful (and you might too)
[Long Post Ahead]
This is my first post on this subrddit. There have been a few high efforts posts related to this on this subreddit before, the two I found are this and this. I believe I should be able to make some improvements, and add a few extra resources, hence I am making this post.
Background: I did CP purely as a hobby, with no intention of using it for placements (I am studying EE). I did CP actively just during my first year, and have reached Candidate Master (1900+) @ Codeforces. I am also in active contact with many high rated CPers, and have a sound idea of what resources are good.
I did CP almost exclusively in C++, since it has some "community advantages", as I would like to call it. Most submisssions will always be in C++, and model solutions will also be always made in C++, if not in other languages. You are also more likely to get help since there will be more users who would have used C++. Also, you will find more pre-written libraries/ implementations in C++. You can certainly do it in Python or any other language you like, but it would be non-meta. I did not use any course as such to learn C++, but rather learnt by reading up documentation on cpluslus and actually writing code. Even for Python, I used pythonds3.
BOOKS
- Kostka, Bartosz. "Sports programming in practice." Master’s thesis, University of Wrocław, 2021. Link to book. This is a book on competitive programming by kostka, an Ukrainian International Grandmaster.
- Competitive Programming 4.This is a much more comprehensive book, and is sold in 2 parts. The books can be bought from here. However, you can find both books available online as well, but I am not including the links here (they are easy to find).
- Introduction to Algorithms (CLRS). It would be unfair to not include this book. The book is very easily available online (I had got it from here). There are also several courses based on this book, that you may use to complement your understanding like MIT's Introduction To Algorithms (SMA 5503). There are also several online resources with solutions to CLRS excercises, such as this.
COURSES / PLAYLISTS
I never personally used any of the DSA/ CP playlists that are popular here in India, but that does not mean I haven't watched any such content. Some Youtube channels, playlists or courses. The ones I found valuable are listed below -
- Codeforces Edu Section - The ITMO Academy: Pilot Course has content on Suffix Arrays, Segment Trees, DSU and Two Pointers. It also comes with practice section with some questions. It is taught by Pavel Mavrin (aka Pashka), who is by far my favorite teacher I have learnt algorithms from.
- A&DS English Course is an incredible playlist, once again taught by Pavel Mavrin. However, most of it is pretty advanced and has stuff you are likely to never need in actual contests. However, I really enjoyed learning from him (specially DSU, Dynamic Progamming and Graph Games).
- USACO Guide is probably the most exhaustive resource ever compiled. It has various sections that are meant to be navigated in given order. It has both explanations for the topics and practice problems.
- YouTube Channels of various well known Competitive programmers also have several videos, which may come in clutch for various topics. Such channels include those by Errichto and Colin Galen. Colin in particular has some topicwise practice streams that really helped me out. Umnik's channel has screencasts of him solving several contests (Codeforces, Atcoder .etc). There are several other such channels, and it will be impossible trying to list them all.
BLOGS / ARTICLES
- Codeforces in itself is an invaluable collection of resources. There is an uncountable number of useful blogs that cover almost anything you will ever need. From editorials, to detailed tutorials on various algorithms and/or techniques, there is a lot of stuff that you just need to discover. The Codeforces Catalog may be useful in this treasure hunt. There are also serveral blogs that just aim to be a compilation of useful blogs, like this and this.
- Algorithms for Competitive Programming, commonly known as "CP Algorithms", is a very good collection of well written articles on various Data Structures and Algorithms, and each article comes with a link to some practice problems to implement what you learnt.
PROBLEMSETS / PRACTICE
- We all know that Codeforces and Atcoder are two of the most popular CP platforms. However, actually navigating the problemsets to find a problem of a suitable rating might me a little irksome. CFTracker allows you to filter Codeforces contests (based on Division), view which questions you have solved and so on. Kenkoo is the website that does the same job for Atcoder contests. I am not aware of any such tools for Codechef however.
- The CSES Problemset is a very famous and well regarded problemset that has is supposed to be a collection of "standard problems". It has a section-based approach. You will find several editorials to its problems on various blogs (even on Codeforces). For the Dynamic Programming Section, you can refer to an editorial in 2 parts - first part by Grandmaster icecuber and the second part by me.
- The Atcoder Educational DP Contest is a very good collection of standard dynamic programming tasks as well.
- This is an example of a Codeforces group that has some private contests (gyms) for beginners that may help you in early practice. Here is another.
PROBLEMSETTING
Maybe you are finding it more fun to create new tasks than to solve existing ones? Well, then you would need to try your hand at problemsetting. I have a working idea of how to create tasks, and also what goes on behind the scenes of making a contest (atleast on Codechef). This blog by darkkcyan is an extremely helpful step-by-step guide on how to use Polygon to create tasks.
That will be it from my side. I don't think I am missing something, but if I do recall anything (highly unlikely since I have long retired from this hobby), I will make sure to add it. Feel free to suggest any changes / corrections.
•
u/[deleted] Jul 04 '24
Hi - we added your post to the BTechtards Resources Wiki (DSA/Leetcode Resources Page).
https://www.reddit.com/r/Btechtards/wiki/resources/dsa/
57
u/Professional_Ice7775 Jul 04 '24
I love long and informative posts like this, I wish more people did it. Thank you so much!!!
11
u/[deleted] Jul 04 '24
Why is competitive programming even used for placements? It doesn't say anything about skill in software engineering and once AI becomes good enough to code, it will literally not matter. I don't understand many things in India sometimes.
3
u/Impressive-Pizza8863 IIITA Jul 04 '24
op how long it took u to reach cm and u mentioned u did it as hobby so how much hours u used to give for practise and any aproach u find helpful when u are stuck in a problem or unable to get any idea.
4
u/TerribleSnake5 Jul 04 '24
I only know c can i start cf? If yes then how to sort for easy questions? Or should i learn cpp first?
4
u/[deleted] Jul 04 '24
Thank you for this helpful post!
41
u/Jaldiwhasehato Faltu ka gyaan batata hun Jul 04 '24
Damn, I spent the entirety of last night finding CP resources and roadmaps and here I find this today.
My list was only a subset of this so thanks OP
12
u/icap_jcap_kcap Moderator | VIT Vellore (Data Science) Jul 04 '24
Damn man, thanks for the resources
Also, holy shit you reached cm in your first year itself, damn.
6
u/Then-Rub-8589 Jul 04 '24 edited Jul 04 '24
USACO guide was by far the most helpful to me. You have topic wise resources+ problems from cf/cses/USACO pyq etc with their solutions.
If you are more interview oriented guy rather than hardcore cp then Just pick a road map like neetcode 150 or any other for that matter, and do the topics that are imp for interviews.
Definitely wouldn't recommend Competitive Programming 4 by Steven felix halim that was recommended here If you are new to algorithms in general.
8
u/Infamous_Ad_5400 Jul 04 '24
Very helpful
1
u/Midoriya_04 IIITian [IT] Jul 04 '24
Hi any problemset you would recommend for getting better at DP?
1
u/Gamin8ng Jul 05 '24
Hey I've a question, I'm on CF for 9 months now, have given 30 contests or more, but I'm like stuck in a hell hole, I've practiced many questions on usaco and cf too but one contest my rating goes up, in next it goes down, so what should I do? My many friends tackled it by creating a new cf account as a new account rating goes massively up, so should I too create a new account?
1
u/MaintenanceStreet562 Jul 05 '24
Where did you actually learn all the data structures and algos from ? You have linked a lot of places to practice from , but as you said you didn't use YouTube, did you use books to learn the theory ?
3
u/Professional_Ice7775 Jul 04 '24
Can the mods please add this to pinned posts or maybe in the wiki with due credit to OP?
1
u/ZealousidealOwl1318 IIT [EE] Jul 04 '24
Hey, i needed help on how to setup vs code so that i can copy paste testcases to check answers. I tried youtube tutorials but they arent working for me. Any solution for that?
2
u/[deleted] Jul 04 '24
thanks bro✨️
2
u/[deleted] Jul 04 '24
Thanks man
2
u/Electrical_Crazy3625 Jul 04 '24
nice
2
u/Beginning-Software80 Pata nahi ab kaha Jul 04 '24
Thanks op, really appreciate it
2
u/[deleted] Jul 04 '24
thankyou we need more people like you
1
u/AutoModerator Jul 04 '24
If you are on Discord, please join our Discord server: https://discord.gg/Hg2H3TJJsd
Thank you for your submission to r/BTechtards. Please make sure to follow all rules when posting or commenting in the community.
Happy Engineering!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/decent_boy191 BITSian Jul 04 '24
Thank you for the amazing post👌👌
1
u/Impressive-Pizza8863 IIITA Jul 04 '24
one of the best post for cp so far, thanks op.
1
u/[deleted] Jul 05 '24
I am at a crossroad though,is cp really beneficial for developing problem solving skills though?
1
u/Rockerz_i Jadavpur Uni IT Jul 16 '24
Hey would you recommend pavel mavrin course or the USACO Guide for begginer coder willing to explore the field?
1
u/eren077 Aug 10 '24
1
u/Direct_Doughnut8275 Feb 18 '25
Great post man
1
u/s0rtal Aug 15 '25
Bartosz Kostka seems to be polish not ukrainian. Polish name, surname and university
1
u/Sweaty-Drawer414 Oct 24 '25
thanks for this
1
u/Shadow_Reaper38 Nov 15 '25
Thanks for the tip bro.
1
u/Ok_Community_9155 [DTU] [SE] Jul 04 '24
Thanks !! Here's your sandwich 🥪
-5
u/weather_forcaster Jul 04 '24
CP slowly becoming the new rat race
-3
u/[deleted] Jul 04 '24
Aap electrical engineering se hoke cp kyu kr rhe ho /s
Also thank u
0
u/[deleted] Sep 07 '24
[deleted] — view deleted comment
3
u/[deleted] Jul 05 '24
[removed] — view removed comment