Algorithm for GATE: An 8-Week Topic-by-Topic Study Plan
Follow a dependency-aware eight-week Algorithm plan with nine focused hours each week, worked examples, delayed reattempts, and a practical rule for missed sessions.
KnowledgeGate Team
Exam prep & CS education

Algorithm feels like one subject, but jumping among sorting, dynamic programming, and graph problems before learning their prerequisites wastes weeks. Give it nine hours a week for eight weeks, 72 hours in total, with one recovery hour for missed work. Follow the order below from analysis to mixed tests. PYQs diagnose weak question forms; they do not predict marks or weightage. Place this block inside the wider GATE CS Exam Preparation calendar.
1. Set the baseline and the nine-hour weekly rhythm
Use the same rhythm weekly: four 90-minute sessions for concepts, traces, drills, and PYQs, then one 2-hour mixed-practice block and one 1-hour review or recovery block. The total is 4 x 90 minutes + 120 minutes + 60 minutes = 540 minutes = 9 hours. Treat eight hours as core work and protect the final hour for recovery or the error log.
Start with 12 mixed questions in 45 minutes, two each from analysis, complexity, sorting and searching, greedy and DP, MST and shortest paths, and advanced algorithms. If 6 are correct, 3 wrong, and 3 unattempted, you attempted 9, so accuracy is 6/9 = 66.7% and completion is 9/12 = 75%. Tag the six misses by topic. Keep five tracker columns: topic, question form, error, fix, next reattempt date.

2. Weeks 1 and 2: earn the right to solve harder problems
Week 1 uses 3 hours for algorithm analysis, loop counting, growth rates, and asymptotic notation; 3 hours tracing inputs; 2 on topic questions; and 1 on review. Make a one-page ordering sheet such as 1 < log2 n < sqrt(n) < n < n log2 n < n^2 < 2^n for sufficiently large n. Small inputs do not prove an asymptotic order.
In Week 2, study recurrences, recursion trees, and the Master Theorem after mastering iterative counting. For T(n) = 2T(n/2) + n, with T(1) = 1 and n = 16, four splitting levels each cost 16, giving 4 x 16 = 64. The 16 leaves cost 16 x 1 = 16, so T(16) = 64 + 16 = 80. This matches n log2 n + n = 16 x 4 + 16 = 80.
Classify every PYQ as a code trace, growth comparison, or recurrence solution. Frequency in your practice set is not a forecast of future GATE weightage.
3. Week 3: sorting and searching through traces
Use 2 hours for comparison properties, 3 for traces, 2 for PYQs, 1 for a timed set, and 1 for review. Tabulate best, average, and worst time, auxiliary space, stability, and in-place status.
Merge sort on [8, 3, 6, 2] orders the pairs as [3, 8] and [2, 6], then produces [2, 3, 6, 8]. It uses five comparisons: one within each pair and three in the final merge. Binary search for 23 in [2, 5, 8, 12, 16, 23, 38] inspects 12 at index 3, then 23 at index 5, succeeding in two key comparisons.
Use Sorting Algorithms: Complexity, Stability, n log n Bound to consolidate the properties after doing the traces. Practise intermediate array states, stability, recurrences, and comparison lower bounds as distinct question forms.
4. Week 4: learn when greedy choice stops working
Allocate 3 hours to greedy proofs and counterexamples, 3 to DP state design, 2 to mixed questions, and 1 to review. For DP, identify repeated subproblems, define the state, write the transition, set base cases, then choose table order and any safe space reduction.
Consider 0/1 knapsack with capacity 10 and items (weight, value) = (4, 20), (5, 24), (6, 27). Value-density greedy takes the first two items, reaching weight 9 and value 44; the third item cannot fit. The legal pair (4, 20) + (6, 27) uses full capacity and returns 47, while the other pair weighs 11 and is illegal. DP therefore selects the 47-value pair. Fractional knapsack differs because it allows part of an item.
End the week with six paired questions. Before calculating, choose greedy or DP and justify the choice. Train that decision; arithmetic only confirms it.
5. Weeks 5 and 6: connect traversals, spanning trees, and shortest paths

In Week 5, study graph representation, BFS and DFS traces, disjoint sets, Kruskal, and Prim. In Week 6, study Dijkstra, Bellman-Ford, and all-pairs ideas, then make a limited pass over string matching and NP-completeness vocabulary. Keep the nine-hour rhythm in both weeks. If foundations remain weak, cut the advanced extension first.
Reuse one weighted undirected graph: vertices {A, B, C, D} and edges AB=1, AC=4, BC=2, BD=5, CD=1. Dijkstra from A starts with tentative distances B=1, C=4. After settling B, they are B=1, C=3, D=6. Settling C improves D to 4, giving final distances A=0, B=1, C=3, D=4. The shortest path from A to D is A-B-C-D. An MST uses AB=1, CD=1, and BC=2, with total weight 1 + 1 + 2 = 4.
Graph Algorithms: BFS, DFS and Dijkstra Traced Step by Step connects these methods. An MST minimises the total weight connecting all vertices; a single-source shortest-path algorithm minimises paths from one source. Treat negative edges as an algorithm-choice condition, not a formula to memorise.
6. Week 7: turn PYQs into an error-repair loop
Use attempt -> classify -> repair -> reattempt every session. Keep tagged GATE PYQs for exam-pattern review, and use broader Algorithm practice questions only for extra drills.
On a 15-question, 60-minute mixed set, suppose you get 8 correct, 4 wrong, and leave 3 unattempted. Attempted accuracy is 8/12 = 66.7%, and completion is 12/15 = 80%. Reattempt only those seven misses 48 hours later without notes. If you then get 6 correct and 1 wrong, six errors are closed and one stays in the next cycle.
For every miss, record a one-line cause, one corrected trace or rule, one near-variant question, and a reattempt date. Reading a solution does not repair an error.
7. Week 8: test, revise, and absorb missed days without cramming
Allocate the final nine hours exactly: two 90-minute mixed tests, two 90-minute reviews, one 2-hour weak-topic repair block, and one 1-hour decision-sheet revision. Use the GATE Test Series: Mocks & Topic-wise Tests for timed practice.
If you miss one 90-minute session, use Sunday's 60-minute recovery block for its highest-value part. Carry only 30 minutes forward by trimming the next week's lowest-priority drill. If you lose 3 or more hours, drop the advanced extension, keep the foundation and mixed test, and resume the sequence. Never double the next day.
Before finishing, check that you can explain an algorithm choice before calculation, trace core methods on small inputs, and keep old errors corrected on delayed reattempts.
8. The short version and the next action
Across 72 hours, move from analysis and complexity to sorting, paradigms, graphs, PYQ repair, and mixed tests, while protecting one recovery hour each week. For a structured subject path, use GATE Guidance by Sanchit Sir. Schedule the first 45-minute diagnostic now, create the five-column tracker, and begin Week 1 from the six tagged misses.
Keep learning
Matrix Chain Order: DP Recurrence, Table and a 4-Matrix Worked Example
See why order changes scalar cost even when the final matrix does not. Build both DP tables for p = [5, 10, 3, 12, 5] and recover the 405-cost solution.
Longest Common Subsequence (LCS): Build the DP Table Step by Step
Build an LCS table from its prefix state, trace every important cell, and backtrack one valid answer. The worked example ends with GTAB.
Fractional Knapsack Explained: Greedy Logic, Worked Example and Exam Traps
Learn why ratio order is optimal for divisible items, trace every step of a capacity-50 solution, and avoid common greedy and arithmetic mistakes.
Growth Rate Comparisons: How to Order Functions Step by Step
Learn how to normalise and order logarithmic, polynomial, exponential, and factorial functions without letting a small-value table mislead you.





