ACM-ICPC Preparation
This curriculum has been developed to learn Algorithms to use in Competitive Programming, but can also be used for:
- Practicing for Interviews
- Improving Algorithmic Thinking
- Practicing for College Classes
Prerequisites:
- To know at least one programming language. (You have to be able to use the language efficiently.)
The concept of this repository is to have well-structured content divided into parts that one can follow even if they are busy. Here we collected sources we find well prepared to learn the proposed topics. The curriculum has different data structures and algorithms.
Estimated time required for a week is 6-7 hours. (To complete the curriculum in the given time)
Basic usage guide: Using this repository depends on what the user wants to do with it. Here we are suggesting the following for people who want to slowly gain knowledge of the topics while continuing their studies etc.:
- Check out the written or video sources provided for a given topic depending on the preference. Go over as many as needed to gain a good understanding of the topic.
- Without checking the source code, try to replicate the algorithm or data structure on your own.
- When stuck or when done, look at the source codes provided, and compare them with yours to see what might be your mistake. Try to fix it.
- After you feel comfortable with the code, try to solve the given problems.
- When you are done with solving or are stuck at some point, check given solutions and try to understand your mistake or see if a better approach exists.
Resources
Here are some of the websites/tools that we use through this curriculum:
Contribution
If you have anything to add, do not hesitate to offer! You can check Code of Conduct. You can submit a PR or an issue; I will try to personally review all.
Topics
Here are the topics we currently include in the curriculum.
Data Structures
- Stacks
- Queues
- Priority queue
- Hashmap
- Linked List
- Trees
- Heaps
- Advanced Trees
- Tries
- Segment trees
- Fenwick tree or Binary indexed trees
- RMQ
- SQRT Decomposition
- Disjoint Data Structure
- C++ STL (optional)
Algorithms
-
Number Theory
- Prime Numbers (Sieve of Eratosthenes)
- GCD and LCM Euclid’s Algorithm
- Modular Exponentiation
- Long arithmetic (Multi, Add)
- Efficient Prime Factorization
-
Combinatorics (Probability-Combinations-Permutations-Matrix..)
-
Computational Geometry
- Primitive Operations
- Intuition
- Polygon Inside, Outside
- Implementing CCW
- Immutable Point ADT
- Convex Hull
- Closest pair problem
- Line intersection
- Primitive Operations
-
Sort
- QuickSort
- Counting Sort
- Merge Sort
-
Search
- Binary Search
- Ternary Search
-
Graph Theory
- Depth First Search (DFS)
- Breadth First Search (BFS)
- Dijkstra’s Shortest Path
- Minimum Spanning Tree
- Ford Bellman
- Floyd Warshall
- LCA (Lowest Common Ancestor)
- Max Flow / Min Cut
-
Dynamic Programming
- Knapsack
- Matrix chain multiplication
- Coin Change
- Kadane
- Longest increasing Subsequence (with RMQ)
-
Strings
- Z algorithm
- Suffix Trees/Arrays
- Knuth-Morris-Pratt Algorithm (KMP)
- Rabin-Karp Algorithm
- Hash
-
Bit Manipulation
-
Game theory
- Nim game
- Grundy numbers
- Sprague-Grundy theorem
-
Optional Advanced Algorithms
- AVL Trees
- Graph Coloring
- Mo's Algorithm
- Palindromic Tree
- Heavy Light Decomposition
- Dynamic Programming by Profile
- Rod Cutting
- Topological Sorting
- DP with Bitmask - Dynamic Programming
- Diobhantine Equation - Math
- Flood Fill - Graph
Curriculum
Week | Topics | Optional Topics |
---|---|---|
**Heads Up ** |
|
|
1.Week |
|
|
2.Week |
|
|
3.Week |
|
|
4.Week |
|
|
5.Week |
|
|
6.Week |
|
|
7.Week |
|
|
8.Week | Questions from previous topics | |
9.Week |
|
|
10.Week |
|
|
11.Week |
|
|
12.Week |
|
|
13.Week |
|
|
14.Week |
|
|
15.Week |
|
|
16.Week | Questions from previous topics | |
17.Week |
|
|
18.Week |
|
|
19.Week |
|
|
20.Week |
|
|