Explore: GATE CS hub · All GATE CS topics · Syllabus & pattern · GATE CS 2026
Answer first
Algorithms has appeared in 11 of the 11 official GATE CS papers from 2016–2026, with 47 questions in all. It averages 6.8 marks a year, which puts it 9th of 11 technical subjects. The last three papers gave it 7 (2026), 5 (2025), 7 (2024).
The concepts that came back most often are Minimum Spanning Tree, Asymptotic Complexity, Graph Traversal. Minimum Spanning Tree, Asymptotic Complexity appeared in at least 7 of the 11 years. 30% of the questions are NAT, so you have to work out an exact value with no options to eliminate.
Marks per year
One official set per year (set 1 where GATE CS ran two sessions). Marks are as printed in the official answer key.
| Year | Questions | Marks |
|---|---|---|
| GATE CS 2026 | 4 | 7 |
| GATE CS 2025 | 4 | 5 |
| GATE CS 2024 | 4 | 7 |
| GATE CS 2023 | 2 | 3 |
| GATE CS 2022 | 3 | 5 |
| GATE CS 2021 | 7 | 10 |
| GATE CS 2020 | 4 | 7 |
| GATE CS 2019 | 4 | 6 |
| GATE CS 2018 | 5 | 10 |
| GATE CS 2017 | 4 | 6 |
| GATE CS 2016 | 6 | 9 |
Most-asked concepts
Sorted by how many years a concept appeared in, then by marks.
| Concept | Questions | Marks | Years asked |
|---|---|---|---|
| Minimum Spanning Tree | 13 | 23 | 2026, 2025, 2022, 2021, 2020, 2019, 2018, 2017, 2016 |
| Asymptotic Complexity | 9 | 12 | 2024, 2023, 2022, 2021, 2019, 2018, 2017 |
| Graph Traversal | 7 | 13 | 2026, 2024, 2022, 2021, 2018, 2016 |
| Recurrences | 5 | 7 | 2026, 2025, 2024, 2021, 2020 |
| Sorting | 4 | 4 | 2025, 2021, 2019, 2016 |
| Shortest Paths | 3 | 6 | 2026, 2020, 2016 |
| Dynamic Programming | 2 | 4 | 2021, 2018 |
| Greedy Algorithms | 1 | 2 | 2018 |
| Searching | 1 | 2 | 2017 |
| Algorithm Design Paradigms | 1 | 1 | 2017 |
| Divide & Conquer | 1 | 1 | 2019 |
How to practise Algorithms from these PYQs
- Start with the concepts at the top of the table above. They repeat, so they pay off first.
- Open the official PDF for a year, solve only that year’s Algorithms questions against the clock (about 3 minutes a mark), then check the official key listed below.
- Log each miss by concept and type (MCQ, MSQ, NAT). An MSQ with one extra option scores zero, so log those separately.
- Once a concept is clean across two or three years, move on to the next one.
- Then sit a full year paper from the GATE CS hub so the subject drill turns into exam timing.
Questions by year
Each line gives the official question number, marks, type and concept, our one-line summary and the official key. The full question is in the official PDF linked under each year.
GATE CS 2026 (CS1)
- Q.17 · 1 mark · MCQ · Recurrences: Asymptotic solution of two coupled divide-and-conquer recurrences (key: A)
- Q.41 · 2 marks · MCQ · Shortest Paths: Recurrence for minimum-weight paths of bounded length (key: A)
- Q.49 · 2 marks · MSQ · Minimum Spanning Tree: Cycle and cut properties of MSTs with unique weights (key: A, D)
- Q.50 · 2 marks · MSQ · Graph Traversal: Discovery and finishing time properties in DFS (key: B, D)
Paper: official PDF · GATE CS 2026 page
GATE CS 2025 (CS1)
- Q.18 · 1 mark · MCQ · Minimum Spanning Tree: Relation between shortest distances in a graph and in its MST (key: B)
- Q.20 · 1 mark · MCQ · Recurrences: Asymptotic solution of T(n) = 2T(n-1) + n 2^n (key: A)
- Q.33 · 1 mark · NAT · Sorting: Number of swaps bubble sort makes on a descending array of 30 items (key: 435)
- Q.64 · 2 marks · NAT · Minimum Spanning Tree: Largest edge weight for which an edge is in every MST (key: 5)
Paper: official PDF · GATE CS 2025 page
GATE CS 2024 (CS1)
- Q.17 · 1 mark · MCQ · Asymptotic Complexity: Worst-case comparisons to check if an array is sorted in one pass (key: A)
- Q.42 · 2 marks · MCQ · Recurrences: Asymptotic solution of T(n) = sqrt(n) T(sqrt(n)) + n (key: A)
- Q.45 · 2 marks · MSQ · Graph Traversal: Properties of a graph whose DFS tree is also a BFS tree (key: C)
- Q.60 · 2 marks · NAT · Graph Traversal: Connected components from the edge count of a DFS forest (key: 60)
Paper: official PDF · GATE CS 2024 page
GATE CS 2023
- Q.29 · 1 mark · MSQ · Asymptotic Complexity: Big-O, Omega, little-o and Theta relations between n and n squared (key: A, C)
- Q.54 · 2 marks · MSQ · Asymptotic Complexity: Asymptotic counts of increments in two loop-based functions (key: A, D)
Paper: official PDF · GATE CS 2023 page
GATE CS 2022
- Q.11 · 1 mark · MCQ · Asymptotic Complexity: Which asymptotic relation between f(n^2) and f(n)^2 holds for positive functions (key: A)
- Q.49 · 2 marks · MSQ · Minimum Spanning Tree: True statements about MST edges in a graph with distinct weights (key: A,B,C)
- Q.58 · 2 marks · NAT · Graph Traversal: Number of paths in a directed graph defined by an adjacency matrix (key: 24)
Paper: official PDF · GATE CS 2022 page
GATE CS 2021 (set 1)
- Q.2 · 1 mark · MCQ · Asymptotic Complexity: Lower bound on comparisons to find both minimum and maximum (key: C)
- Q.3 · 1 mark · MCQ · Asymptotic Complexity: Order three functions by asymptotic growth rate (key: D)
- Q.9 · 1 mark · MCQ · Sorting: Sort using the fewest comparisons on an already sorted array (key: C)
- Q.17 · 1 mark · NAT · Minimum Spanning Tree: Number of distinct minimum spanning trees of a small graph (key: 3)
- Q.30 · 2 marks · MCQ · Recurrences: Solve T(n) = T(n/2) + T(2n/5) + 7n (key: C)
- Q.40 · 2 marks · MSQ · Dynamic Programming: Optimal revenue values for the rod-cutting problem (key: A, C)
- Q.41 · 2 marks · MSQ · Graph Traversal: Articulation points and the DFS tree (key: B)
Paper: official PDF · GATE CS 2021 page
GATE CS 2020
- Q.2 · 1 mark · MCQ · Recurrences: Solve a recurrence of the form T(n) = T(n^(1/a)) + 1 (key: A)
- Q.31 · 2 marks · MCQ · Minimum Spanning Tree: Time to check whether an MST stays minimal after an edge is added (key: D)
- Q.40 · 2 marks · MCQ · Shortest Paths: Effect of edge reweighting on shortest paths (key: A)
- Q.49 · 2 marks · NAT · Minimum Spanning Tree: Weight of the MST of a complete graph with |i-j| weights (key: 99)
Paper: official PDF · GATE CS 2020 page
GATE CS 2019
- Q.20 · 1 mark · NAT · Sorting: Probability randomized quicksort pivot lands in worst position (key: 0.08)
- Q.25 · 1 mark · NAT · Divide & Conquer: Maximum subarray sum of a given sequence (key: 29)
- Q.37 · 2 marks · MCQ · Asymptotic Complexity: Worst-case time to find the median of medians of n arrays (key: C)
- Q.38 · 2 marks · MCQ · Minimum Spanning Tree: Conditions that guarantee a unique minimum spanning tree (key: C)
Paper: official PDF · GATE CS 2019 page
GATE CS 2018
- Q.30 · 2 marks · MCQ · Graph Traversal: Cross edges in DFS and BFS trees (key: A)
- Q.31 · 2 marks · MCQ · Dynamic Programming: Complexity of matrix chain multiplication DP (key: C)
- Q.32 · 2 marks · MCQ · Asymptotic Complexity: Return value growth of a C function with nested loops (key: B)
- Q.47 · 2 marks · NAT · Minimum Spanning Tree: Weight choice that maximises the number of MSTs (key: 4)
- Q.48 · 2 marks · NAT · Greedy Algorithms: Value difference between greedy and optimal 0/1 knapsack (key: 16)
Paper: official PDF · GATE CS 2018 page
GATE CS 2017 (set 1)
- Q.4 · 1 mark · MCQ · Asymptotic Complexity: Order functions by increasing asymptotic growth (key: B)
- Q.5 · 1 mark · MCQ · Algorithm Design Paradigms: Match algorithms to greedy, DP and divide-and-conquer (key: C)
- Q.26 · 2 marks · MCQ · Minimum Spanning Tree: Uniqueness of MST and shortest paths with distinct weights (key: A)
- Q.48 · 2 marks · NAT · Searching: Worst-case probes to find the first 1 in a sorted 0-1 array (key: 5.0)
Paper: official PDF · GATE CS 2017 page
GATE CS 2016 (set 1)
- Q.11 · 1 mark · NAT · Graph Traversal: Number of topological orderings of a directed graph (key: 6.0 : 6.0)
- Q.13 · 1 mark · MCQ · Sorting: Worst-case running times of insertion, merge and quick sort (key: D)
- Q.14 · 1 mark · MCQ · Minimum Spanning Tree: Effect of adding a constant to all edge weights on MST and paths (key: A)
- Q.38 · 2 marks · NAT · Shortest Paths: Largest edge weight keeping a given shortest path structure (key: 12.0 : 12.0)
- Q.39 · 2 marks · NAT · Minimum Spanning Tree: Maximum possible MST weight on K4 with weights 1 to 6 (key: 7.0 : 7.0)
- Q.40 · 2 marks · MCQ · Minimum Spanning Tree: Truth of statements about the lightest and heaviest edges in MSTs (key: B)
Paper: official PDF · GATE CS 2016 page
Other GATE CS subjects
- General Aptitude
- Engineering Mathematics
- Discrete Mathematics
- Digital Logic
- Computer Organization & Architecture
- Programming & Data Structures
- Theory of Computation
- Compiler Design
- Operating Systems
- Databases (DBMS)
- Computer Networks
FAQ
How many marks does Algorithms carry in GATE CS?
Across the official GATE CS papers from 2016–2026 (one set per year), Algorithms carried 6.8 marks a year on average, from 3 in 2023 to 10 in 2021.
Which Algorithms topics repeat most in GATE CS?
By the number of years they appeared in: Minimum Spanning Tree, Asymptotic Complexity, Graph Traversal. The concept table on this page lists every concept with its question count and years.
Are these the official GATE CS Algorithms questions?
Yes. Each question comes from the official GATE CS question paper for that year, and the key, marks and question type come from the official answer key. Summaries are ours; open the official PDF for the full question.
What question types does Algorithms use in GATE CS?
Of 47 questions: 25 MCQ, 8 MSQ and 14 NAT. MSQ only appears from 2021 onwards. 28 of the 47 questions carry 2 marks.