Month 1: Foundations & Core Tools
Goal: Master essential algorithmic tools & complexity awareness.
Week 1 — Functions, Complexity, Arrays, Pointers
- Theory:
- Functions in C++ (pass by ref/value).
- Time Complexity (
O()
notation), worst/best/average case.
- Memory complexity.
- Pointers & references.
- Resources:
- Practice:
- CSES:
Weird Algorithm
, Missing Number
, Repetitions
- Codeforces: #71A, #4A, #158A
Week 2 — Sorting & Searching
- Theory:
sort()
and custom comparators.
- Binary search,
lower_bound
, upper_bound
.
- Two-pointer technique.
- Resources:
- Practice:
- CSES:
Ferris Wheel
, Apartments
, Concert Tickets
- Codeforces: #279B, #1335C
Week 3 — Recursion & Backtracking
- Theory:
- Recursive thinking, call stack, base case importance.
- Backtracking problems (generating permutations, N-Queens idea).
- Resources:
- Practice:
- CSES:
Creating Strings
, Grid Paths
- Codeforces: #580C, #510A
Week 4 — Basic Data Structures
- Theory:
- Stack, Queue, Deque, Set, Map, Priority Queue (all STL).
- When to use which DS.
- Resources:
- Practice:
- CSES:
Sliding Median
, Sliding Cost
- Codeforces: #339A, #405A, #160A