I attached all the resources which I found useful during my preparation.
Learn C++ and STL.
STL video playlist (opens in a new tab)
Don't learn Data Structure or Algorithm now.
Go to Codeforces ProblemSet and solve questions according to rating.
Start with 800 rated problems, do 20-60 questions in each rating, and gradually increase the rating.
Solve till 1200 rating without learning any topic.
After that learn:
- Sliding Window: Playlist Link (opens in a new tab)
- Number Theory: Playlist Link (opens in a new tab)
- Binary Search: Playlist Link (opens in a new tab)
- Bit Manipulation:
Note: After learning any topic, do topic-wise practice on leetcode. But in CF, do rating-wise practice, not topic-wise.
You can solve till 1400 rating only by above topics.
After 1400 learn these:
- Recursion: Playlist Link (opens in a new tab)
- DP: Playlist Link (opens in a new tab)
- For Practicing DP, solve this sheet: Doc Link (opens in a new tab)
- Graph: Playlist Link (opens in a new tab)
- Trees: Video Link (opens in a new tab)
- DSU: Playlist Link (opens in a new tab)
After 1600 learn these:
- Segment Tree: Video Link (opens in a new tab)
- Bitmask DP: Playlist Link (opens in a new tab)
- Digit DP: Playlist Link (opens in a new tab)
- Binary Lifting: Video Link (opens in a new tab)
- Solve Tree and Graph problems from CSES problemset. My CSES solutions on GitHub (opens in a new tab)
Codeforces has so many ad-hoc and constructive algo problems. To become good at them, practice is the only way. There is no particular resource or trick to solve those problems. Just do more and more practice to become good at them.
Important Points
- I don't recommend solving any ladder because most of the qsns in them are old. Instead, solve CF Problem set rating-wise.
- Give every contest of Codeforces and upsolve at least 1 qsn after the contest.
- Try to solve ABC in a contest fast without any Wrong Answer.
- Whatever playlists I attached, try to watch least videos and focus on solving problems yourself.