Competitive programming Roadmap and Resource
Competitive programming Roadmap and Resource
Only One Rule is followed by every Programmer -> Practice, Practice & Practice.
Motivation
Why would I study Computer Science - http://www.shafaetsplanet.com/?p=1639
Why would I learn programming - http://www.shafaetsplanet.com/?p=1437
Programming Contest and Online Judge - http://www.shafaetsplanet.com/?p=1400
BookList
Book - Computer Programming ~ Author - Tamim Shahriar Subeen
Book - Graph Algorithms - Shafaet Ashraf
Book - Data Structures and Algorithms - Coreman
Book - Competitive Programming 3 or 4 - Steven Halim
● Two pointer
https://www.geeksforgeeks.org/two-pointers-technique/
Problems on Two Pointer:
https://codeforces.com/problemset?order=BY_RATING_ASC&tags=two+pointers
● STL(unordered_map, multiset,deque)
● Bit Manipulation
Ref:
https://www.hackerearth.com/practice/basic-programming/bit-manipulation/basics-of-bit-
manipulation/tutorial/
Problems on BitManipulation:
https://codeforces.com/problemset?order=BY_RATING_ASC&tags=bitmasks
● Prefix Sum
Ref:
https://drive.google.com/file/d/142B7ZStchmXHLdBL8vUjxG0S6-Sj1_Rg/view?usp=shari
ng
● Greedy
Ref:
https://drive.google.com/file/d/1T6mgESEfcwFLC61QEcruy4irTt4fq_cS/view?usp=sharin
g
● Basic Geometry
Problems: https://toph.co/problems/geometry?sort=popularity_desc
● Implementation Problems
https://codeforces.com/problemset?order=BY_RATING_ASC&tags=implementation
● Target Problem solve Count: 300
First of all, you have to identify your comfort zone. That means you have to identify which
problems you can solve more comfortably than others. For example, one might find a 1200
difficulty problem easier to solve but might struggle with 1300/1400 difficulty problem. So he/she
should try solving 1400 difficulty problems. Note that, solving more and more 1200-rated
problems won’t gonna change your skill. You have to choose such problems which will be
challenging your brain.
Now how you should approach a problem:
Suppose you have selected a problem that has 200 more difficulty level than your comfort zone,
You will try solving this problem for the first 30-45 minutes. If you somehow failed to come out
with any logic, then read the first paragraph of the editorial on that problem, don’t read the full
editorial. Then after taking some insights from the editorial, try solving the problem again. If you
again fail to solve that problem, then this time read the full editorial, then try to solve this
problem. If you fail again, then this time try watching some code written by famous coders(i.e
tourist) then try to implement that code after understanding that code. Believe me, this works
like magic.
Participate in at least 1 to 2 virtual contests each day. Try participating from 8:30 to 10:30pm.
A piece of advice, do not engage heavy algo problems until you can solve codeforces A, B and
often C.
Watch this one: https://www.youtube.com/watch?v=87oe8kdAjAs
PBDS: https://www.youtube.com/watch?v=MiBrJTNOEP0
https://codeforces.com/blog/entry/11080
● Basic Game Theory
Ref: http://www.shafaetsplanet.com/?p=2325
http://www.shafaetsplanet.com/?p=2608
https://www.youtube.com/watch?v=2GoUYpQlAUY
● Interactive Problems
Ref: https://codeforces.com/blog/entry/45307
https://www.youtube.com/watch?v=a2QJZT4XDlc
Problems:
https://codeforces.com/problemset?order=BY_RATING_ASC&tags=interactive
● Graph and Tree(MST, Bellman-Ford, Floyd Warshall, Dijkstra Again, Diameter of Tree)
MST: Book - Graph Algorithms - Shafaet Ashraf
Book - Data Structures and Algorithms - Coreman
Book - Competitive Programming 3 or 4 - Steven Halim
MST Problems: https://toph.co/problems/minimum-spanning-tree
● Combinatorics
Ref: https://www.youtube.com/watch?v=fEb_swNH0fY
Problems: https://toph.co/problems/tags/combinatorics
https://lightoj.com/problems/category/combinatorics
Stars and Bars : https://cp-algorithms.com/combinatorics/stars_and_bars.html
● Game Theory
Ref:
https://www.youtube.com/watch?v=EienAWnUPow
http://www.shafaetsplanet.com/?p=2714
● Data Structure(Segment Tree with Lazy Propagation, BIT, Mergesort Tree, LCA, MO)
Ref: https://www.youtube.com/watch?v=0v--9nEFfAM
BIT: http://www.shafaetsplanet.com/?p=1961
Problems on BIT: https://codeforces.com/blog/entry/20569
LCA: http://www.shafaetsplanet.com/?p=1831
https://www.topcoder.com/thrive/articles/Range%20Minimum%20Query%20and%20Low
est%20Common%20Ancestor
Problems on LCA: https://lightoj.com/problems/category/rmq-lca