🎯
These notes take you from zero to full marks in GATE Algorithms. Read in order: every lesson uses only ideas taught before it. Each lesson takes 20–35 minutes.
Every lesson has the same sections. Questions always come before answers. Answers sit in a closed Answer Vault at the bottom of each lesson; the Predict First answer opens Section 3.
🔁
Spaced recall. Each lesson opens with 3 warm-up questions: one from the previous lesson, one from about 3 lessons back, one from 7 or more lessons back.
🧪
Verified. Computable answers were re-computed by code before they were written down: loop and call counts, recurrences, binary-search probes, hash-table traces, sort traces and comparison counts, greedy choices, DP tables, BFS/DFS orders, MSTs and shortest paths.
Your commands, on this page
| Command | Here |
|---|---|
| next | The “Type next →” link at the end of every lesson. |
| roadmap | The roadmap below and the sidebar. Press Mark as done on a lesson and it gets a ✅ in both (stored in this browser). |
| revise [lesson ID] | Search the sidebar for the ID, or use that lesson's Rule Card and the Master Rule Sheet (7.1.1). |
| simpler / deeper | Ask Claude in chat, naming the lesson ID. Deeper practice for every chapter is in its Lock-in and in Phase 7. |
| start final test | Lesson 7.4.1. The test page shows no answers. |
| submit | Enter your answers in 7.4.1 and press Submit answers: score with GATE negative marking, topic-wise accuracy, the questions you got wrong and the lessons to re-read. |
| key | The very last section of the notes. |
Conventions used throughout
📐
- Two running examples. Sorting lessons trace the same array A = [5, 2, 9, 1, 7, 3]. Graph lessons reuse one weighted road map of six towns A–F (Phase 6), so BFS, MSTs and shortest paths are compared on the same picture.
- log means log₂ unless written otherwise; ln is the natural log. ⌊x⌋ and ⌈x⌉ are floor and ceiling.
- Code is C-like pseudocode; arrays in code start at index 0 unless a lesson says 1 (binary heaps use 1-based indices, as GATE does).
- Sorting means ascending order. Comparisons count key comparisons only.
- Graphs: adjacency lists are in alphabetical (or numerical) order, and ties are broken by that order, so traversal orders are unique.
- Marks follow GATE: MCQ wrong answers cost 1/3 (1-mark) or 2/3 (2-mark); MSQ and NAT have no negative marking; MSQ has no partial credit.