Skip to main content
GATE Preparation15 min read

Algorithms for GATE CS 2027: Weightage, PYQs & Study Plan

Algorithms for GATE CS 2027: official syllabus, marks counted from all 23 GATE CS papers (2014–2026), topic trends in recurrences, graphs and MSTs, 5 solved PYQs, books and a study plan.

By Sriniwas Paliwal•25 October 2026

Algorithms is worth about 8 marks per GATE CS paper, or roughly 7.9% of the 100-mark paper. We counted every algorithms question in all 23 official GATE CS papers from 2014 to 2026. The subject averaged 7.9 marks and ranged from 3 to 12. It dipped sharply from 2022 to 2024, with just 3 to 5 marks a paper, then recovered to 6 to 10 marks in 2025 and 2026. Asymptotic analysis and recurrences are the biggest topic, and graph algorithms have grown the fastest. This guide covers the official 2027 syllabus, topic-by-topic numbers, five worked questions from past papers and a study order based on that data.

How we counted: we classified all 1,495 GATE CS questions from 2014 to 2026 by subject and topic, using the official papers as reproduced on Success Tracker's GATE CS PYQ archive. We followed the official syllabus split between subjects. Hashing, searching and sorting are counted under Algorithms, because the syllabus lists them there. Questions that test data structures themselves (trees, heaps, stacks, queues, graph representations) are counted under Programming and Data Structures. Graph-theory questions with no algorithm in them are counted under Discrete Mathematics. A few questions appear twice in the 2015 papers on that archive, and we counted each of those only once. Confirm the syllabus on the official GATE 2027 syllabus page (IIT Madras).

GATE CS 2027 Algorithms Syllabus

Algorithms is Section 5 of the official GATE 2027 CS syllabus. The official text lists:

  • Searching, sorting, hashing
  • Asymptotic worst case time and space complexity
  • Algorithm design techniques: greedy, dynamic programming and divide-and-conquer
  • Graph traversals, minimum spanning trees, shortest paths

This is identical to the GATE 2026 CS syllabus. Complexity theory (P, NP, NP-completeness and reductions) is not in the syllabus. It was last asked in 2015, with 8 marks across 5 questions in 2014 and 2015, and has not appeared since. Network flow, amortised analysis and string matching are not listed either. For the full CS syllabus, see our GATE CS syllabus page.

How Many Marks Does Algorithms Carry in GATE CS?

The official question paper pattern fixes marks only for General Aptitude (15) and Engineering Mathematics (13). This is what Algorithms carried in each paper:

Year Marks per paper (set-wise) % of the 100-mark paper Questions
201410 / 8 / 1010% / 8% / 10%6 / 5 / 6
201510 / 11 / 1010% / 11% / 10%6 / 7 / 6
20169 / 79% / 7%6 / 5
20176 / 96% / 9%4 / 5
201888%4
201966%4
202077%5
202112 / 1012% / 10%8 / 6
202244%3
202344%3
20245 / 35% / 3%3 / 2
20258 / 68% / 6%5 / 4
20268 / 108% / 10%5 / 7
Average (23 papers)7.97.9% (range 3–12%)5.0

What this means: pure algorithms questions were scarce from 2022 to 2024, but 2026 Set 2 had 10 marks across 7 questions, so don't plan around the dip. In practice, algorithms thinking also scores in other subjects: graph questions in Discrete Maths, tree and heap questions in Data Structures, and recurrences everywhere. Together, Algorithms and Programming and Data Structures have averaged about 18 marks per paper, the largest block in the paper after General Aptitude.

Topic-Wise Weightage: Where Algorithms Marks Come From

We grouped the 115 Algorithms questions by syllabus heading, with the average marks per paper across all 23 papers:

Topic Questions Total marks Avg marks per paper (23 papers) Last asked
Asymptotic analysis and recurrences38552.42026
Graph traversals and shortest paths21361.62026
Greedy algorithms and minimum spanning trees17321.42026
Dynamic programming11180.82026
Hashing10140.62026
Searching and sorting10130.62026
Divide and conquer (as a technique)350.22019
Complexity theory (no longer in the syllabus)580.32015

Looking at individual topics, the most-asked across all 23 papers were asymptotic notation (12 questions), Kruskal's algorithm and MST properties (12 questions, 22 marks), best, worst and average case analysis (8 questions) and the master theorem (6 questions).

Three patterns stand out:

  1. Complexity analysis still leads. At about 2 marks per paper since 2021, comparing growth rates and solving recurrences is the most reliable source of Algorithms marks. Most of these are 1-mark MCQs.
  2. Graph algorithms are rising. They went from 1.3 to 1.9 marks per paper, and 2026 asked about topological order on weighted DAGs, Bellman–Ford and DFS edge classification. Learn the algorithms well enough to reason about how they behave, not just to run them.
  3. MST questions test properties. Recent MST questions ask which edges must be in every MST, how many MSTs exist, or what limit on a weight keeps an edge in the tree. Learn the cut and cycle properties, not just the steps of Kruskal's and Prim's algorithms.

Question Types in Algorithms

From 2021 to 2026, the 46 Algorithms questions split into 24 MCQs, 13 MSQs and 9 NATs, carrying 35, 22 and 13 marks respectively. Half the marks still come from MCQs, so negative marking matters more here than in OS or Discrete Maths. A wrong 1-mark MCQ costs 1/3 mark and a wrong 2-mark MCQ costs 2/3 mark (official marking rules). For growth-rate MCQs, guessing between two close options is rarely worth the risk.

Topic by Topic: What GATE Asks and How to Prepare

1. Asymptotic Analysis and Recurrences

What gets asked: ordering functions by growth rate, the time complexity of loops and recursive code, solving recurrences with the master theorem or a recursion tree, and best, worst and average case reasoning.

How to prepare: take logarithms to compare functions such as nlog n and (log n)n. For the master theorem, compare f(n) with nlogb a, and remember it does not apply in the gaps between cases. For nested recurrences, solve the inner one first (worked example 1).

Recent PYQs: ordering growth rates (2026), which recurrences fit an algorithm (2026, MSQ), complexity of an array procedure (2026).

2. Graph Traversals and Shortest Paths

What gets asked: BFS and DFS properties, DFS edge classification (tree, back, forward and cross edges), topological sorting, Dijkstra's algorithm and why it fails with negative edges, Bellman–Ford, and articulation points.

How to prepare: for each algorithm, learn its complexity, what it assumes about edge weights, and one input where it fails. GATE often tests the edge cases: Dijkstra with a negative edge, BFS distances in weighted graphs, DFS back edges and cycles.

Recent PYQs: weighted DAG and topological order (2026), Bellman–Ford on an undirected graph (2026), DFS edge classification (2026, MSQ), BFS and shortest paths (2025, MSQ).

3. Greedy Algorithms and Minimum Spanning Trees

What gets asked: MST properties, counting distinct MSTs, weight limits that keep an edge in every MST, Huffman coding, and activity selection.

How to prepare: learn the two properties that answer most MST questions. Cut property: the lightest edge crossing any cut is in some MST, and in every MST if it is the unique lightest edge. Cycle property: the unique heaviest edge on a cycle is in no MST. For Huffman coding, practise building the tree and computing the average code length.

Recent PYQs: largest x keeping an edge in every MST (2025, NAT), number of distinct MSTs (2024, NAT), MST with equal weights (2022, MSQ).

4. Dynamic Programming

What gets asked: writing or completing a recurrence (rod cutting, LCS, LIS, matrix chain multiplication, knapsack), filling in a table entry, and memoization versus tabulation.

How to prepare: for each classic problem, be able to write the recurrence from memory, fill a small table by hand, and say the time and space complexity. GATE usually gives you the recurrence and asks what it computes, or gives the problem and asks which recurrence is correct.

Recent PYQs: filling a DP table (2026), LIS-style distance (2024, NAT), rod cutting (2021, MSQ).

5. Hashing

What gets asked: chaining and longest-chain questions, linear probing, quadratic probing and double hashing sequences, expected probes, and choosing a hash function.

How to prepare: work every insertion by hand and write the table after each key. Hashing has asked about 0.8 marks per paper since 2021, almost all of it mechanical, so it is a quick win.

Recent PYQs: open addressing (2026, MSQ), double hashing (2025, NAT), hashing against an adversary (2023).

6. Searching and Sorting

What gets asked: the number of comparisons or swaps in a sorting algorithm, merge sort behaviour, binary search variants on rotated or bitonic arrays, lower bounds, and which sorts are stable or in place.

How to prepare: learn the best, average and worst cases of every standard sort, and which are stable. Practise binary search on modified arrays. These questions test whether you can adapt the idea to a new setting (worked example 5).

Recent PYQs: void merges in merge sort (2026, NAT), tracing a sorting function (2025, NAT), minimum comparisons in an unordered list (2025).

Worked Examples from Official GATE CS Papers

Each answer below matches the official answer key, as reproduced on the linked question page.

Example 1: A nested recurrence (GATE CS 2026 Set 1, Q17, 1 mark)

Question: T1(n) = 4T1(n/2) + T2(n) and T2(n) = 5T2(n/4) + Θ(log n). What is T1(n)?

Solution: solve T2 first. Here nlog45 ≈ n1.16 grows faster than log n, so T2(n) = Θ(nlog45). For T1, nlog24 = n², which grows faster than n1.16, so T1(n) = Θ(n²). The distractors use nlog45, which is only the cost of T2. Practise this question.

Example 2: MST properties (GATE CS 2026 Set 1, Q49, 2 marks, MSQ)

Question: G has unique edge weights. Which of these are true? (A) The heaviest edge in every cycle is in no MST. (B) The lightest edge in every cycle is in every MST. (C) The heaviest edge at every vertex is in no MST. (D) The lightest edge at every vertex is in every MST.

Solution: A is the cycle property, so it is true. D is the cut property applied to the cut around one vertex, so it is true. B is false: the lightest edge on one cycle can still be the heaviest on another cycle, which removes it. C is false: a vertex with only one edge, such as a leaf, must use that edge however heavy it is. The answer is A and D. Practise this question.

Example 3: Longest chain (GATE CS 2026 Set 2, Q30, 1 mark, NAT)

Question: keys 5, 28, 19, 15, 26, 33, 12, 17 and 10 are inserted with h(k) = k mod 9 and chaining. How long is the longest chain?

Solution: the hash values are 5, 1, 1, 6, 8, 6, 3, 8 and 1. Slot 1 gets 28, 19 and 10, slot 6 gets 15 and 33, and slot 8 gets 26 and 17. The longest chain has 3 keys. Practise this question.

Example 4: Void merges in merge sort (GATE CS 2026 Set 2, Q32, 1 mark, NAT)

Question: merge sort runs on [10, 7, 8, 19, 41, 35, 25, 31], which takes 7 merges. A merge is "void" if its output is just L followed by R. How many merges are void?

Solution: at the bottom level, [10]+[7] is not void, [8]+[19] is void, [41]+[35] is not void and [25]+[31] is void. At the next level, [7,10]+[8,19] gives 7, 8, 10, 19, which is not void, and [35,41]+[25,31] is not void either. The final merge [7,8,10,19]+[25,31,35,41] is void, because every element on the left is smaller. That makes 3. Practise this question.

Example 5: Searching a bitonic array (GATE CS 2025 Set 2, Q41, 2 marks)

Question: an array rises and then falls (it is bitonic). What is the best worst-case bound for searching it?

Solution: find the peak with a modified binary search by comparing A[mid] with A[mid+1], which takes O(log n) comparisons. Then binary search the rising half and the falling half, each in O(log n). The total is Θ(log n). Θ(log² n) is the tempting wrong answer, but the three searches are done one after another, not nested. Practise this question.

Study Order and Time Plan

Algorithms takes roughly 5 weeks at 2 hours a day. Study it after Programming and Data Structures, since it assumes you know trees, heaps and graph representations.

  1. Asymptotic analysis and recurrences (5–6 days): the largest topic, and needed everywhere else.
  2. Searching, sorting and hashing (5 days): mechanical, high-accuracy marks.
  3. Graph traversals: BFS, DFS and topological sort (4–5 days).
  4. Shortest paths: Dijkstra and Bellman–Ford (3–4 days), including when each one fails.
  5. Greedy algorithms and MST (4 days): the cut and cycle properties, Kruskal's, Prim's and Huffman.
  6. Dynamic programming and divide and conquer (5 days): classic recurrences and filling tables.
  7. PYQ sweep (3–4 days): all 115 Algorithms questions from 2014 to 2026 on the GATE CS PYQ archive. Skip the complexity-theory questions, which are no longer in the syllabus.

For where Algorithms fits among all the subjects, see the GATE CSE 2027 month-by-month study plan.

Best Books for GATE CS Algorithms

Book Use it for
Cormen, Leiserson, Rivest & Stein (CLRS), Introduction to Algorithms (4th ed., MIT Press)The primary text: asymptotics, recurrences, sorting, hashing, greedy, DP, graph algorithms.
Kleinberg & Tardos, Algorithm DesignIntuition for greedy algorithms and dynamic programming.
Dasgupta, Papadimitriou & Vazirani, AlgorithmsA short, readable first pass.

Skip the CLRS chapters on network flow, amortised analysis, NP-completeness, string matching, computational geometry and parallel algorithms. None of them is in the GATE CS syllabus. For other subjects, see our best books for GATE CSE 2027.

The full course, covering all subjects with lectures and mock tests, is on the GATE CS course page.

Common Mistakes in GATE Algorithms

  • Applying the master theorem in the gap between cases, for example when f(n) = n log n against nlogb a = n.
  • Using Dijkstra's algorithm with negative edges. GATE regularly tests exactly where it breaks.
  • Listing Kruskal's steps instead of using MST properties on "which edges must be in every MST" questions (Example 2).
  • Multiplying sequential costs. Searches done one after another add (Example 5).
  • Studying P versus NP. It is not in the 2027 syllabus and has not been asked since 2015.

Key Takeaways

  • Algorithms averaged 7.9 marks per paper (7.9% of the paper) across 23 official GATE CS papers (2014–2026), with a range of 3 to 12.
  • Asymptotic analysis and recurrences make up the biggest topic, at 55 marks overall. Graph algorithms grew from 1.3 to 1.9 marks per paper.
  • MST questions are about properties: learn the cut and cycle properties.
  • Half of Algorithms marks since 2021 came from MCQs, so be careful with negative marking.

Frequently Asked Questions

How many marks does Algorithms carry in GATE CS?

The official pattern does not fix marks per CS subject. Across all 23 official GATE CS papers from 2014 to 2026, Algorithms averaged 7.9 marks per paper, which is 7.9% of the 100-mark paper, with a range of 3 to 12. Together with Programming and Data Structures, it has averaged about 18 marks per paper.

Which Algorithms topics are most important for GATE CS 2027?

Asymptotic analysis and recurrences carry the most marks, followed by graph traversals and shortest paths, then greedy algorithms and MSTs. Graph algorithms have grown the most since 2021.

Is P vs NP in the GATE CS 2027 syllabus?

No. The official 2027 Algorithms syllabus lists searching, sorting, hashing, asymptotic complexity, greedy, dynamic programming, divide-and-conquer, graph traversals, minimum spanning trees and shortest paths. Complexity theory was last asked in 2015.

Which book is best for Algorithms for GATE CS?

CLRS (Introduction to Algorithms, 4th edition) covers the whole syllabus. Read only the chapters that map to it.

Why did Algorithms marks drop in 2022–2024?

Those papers had only 3 to 5 marks of pure algorithms questions each, though they still tested algorithmic thinking through data structures and discrete maths. Algorithms recovered to 6 to 10 marks in 2025 and 2026, so it should not be treated as a low-priority subject.

Where can I practise GATE CS Algorithms PYQs?

Every GATE CS question from 2014 to 2026 is free on Success Tracker's GATE CS PYQ archive, with the official answer and a worked solution.

Next in This Series

Sources

Related topics
gate-csegate-csalgorithmsgate-cs-algorithmsgate-cse-2027asymptotic-analysisgraph-algorithmsminimum-spanning-tree
Start Preparing Today

Ready to Crack GATE DA?

Join The ML Hub for structured courses, daily practice, mock tests, and 1:1 mentorship from GATE toppers and IIT alumni.

New