CP and DSA - RESOURCES
CP and DSA - RESOURCES
You can start giving contests anytime now!!! Start with div4/div3, Solve problems from
Codechef with low ratings first so that you will understand how these platforms work. Then
try out other platforms
3. Solve Pattern printing problems to familiarize yourself with loops and build logical thinking.
Resources
● Solve any Pattern Question - Trick Explained | 22 Patterns in 1 Shot | Strivers …
Road Map: (Not a Road Map but it makes you understand what topics to learn for CP and how to
practice)
● Colin Galen’s Road Map
STL(for C++):
● C++ STL | Competitive Programming (Good Explanation with problems)
● Complete C++ STL in 1 Video | Time Complexity and Notes
Sorting Algorithms:
● Stiver’s part-1, Merge-sort, Quick Sort
Bit Manipulation
● Striver’s Bit Manipulation
Data Structures
→ You can learn Data Structures like stack, queue, set, maps, and deque from your respective
language libraries by searching on GFG website or from the 6th prerequisite (for C++ it will be
completed in the STL or you can follow stack)
1. Priority Queue
● GFG
2. Tries
● Striver’s Tries
3. DSU (Adv)
● Vivek Gupta’s DSU
4. Segment Trees (Adv)
● Pepcoding
5. Ordered Set (C++)
● Priyansh Agarwal
6. Sparse Table
● Sparse Table
7. Fenwick Trees (BIT trees) (Adv)
● P1, P2
Advanced topics for Dynamic Programming (Mostly for CP, but seen in Leetcode too)
1. DP with bitmasking
● Kartik Arora
2. Digit DP
● Kartik Arora
3. DP on Trees
● Kartik Arora
● Tree Rerooting
String Algorithms: (KMP, Z, manacher, String hashing)
● Pepcoding (has many range of topics, only learn KMP, Z, Manacher, String Hashing)
problem from CSES
Useful Techniques:
● Difference array (easy)
● Kadane’s Algorithm (easy)
● Sweep Line (Medium)
● Small to Large merge in trees (Adv, CP)
Sheets to practice:
1. Striver A2Z Sheet
2. Striver SDE Sheet (If you have less time)
3. CSES problem set
4. C2 Ladders (For CP, contains 100 good problems from CF for every rating)
5. ACD Ladders (For CP, contains 100 good problems from CF for every rating, filter by tags is
available)
6. Progvar (Only for CP, has very good old topic-wise Codeforces problems)
7. Neetcode Blind 75
Competitions:
1. Facebook Hacker Cup
2. ICPC
3. TCS CodeVita
Note:
→ Don’t jump into all the topics at once. Take some time and learn when it’s needed. (How will you
know that you have to start learning a topic? Ans: Suppose you solved 3 problems in LC and not the
4th then start learning the topics on which the 4th question is based on).
→ Some playlists contain topics from beginner to advanced. So there is no need to complete all the
videos from a Playlist. Take your time, and give a break if you don’t understand a topic.
→ You can find the topic-wise problems from playlists and you can also search problems based on
tags in Leetcode, Codeforces, and Codechef.
General Advice:
1. Must Upsolve after contest!!
2. Do post contest discussion with friends.
3. Create a healthy competition among peers.
4. Take it as a marathon rather than a sprint.
5. Practice practice and practice
6. And don't forget to flex your achievements.
7. Look at other people's code.
8. Use editorials.