GATE CSE Algorithms PYQ analysis
Topic-wise weightage of Algorithms from the 15 official GATE CSE papers on this site (2017–2026), with every question listed under the syllabus topics it tests.
7.6
average marks per paper
71
PYQs (2017–2026)
4 / 4
syllabus topics asked
#8 of 11
subjects by marks
Algorithms weightage by year
Per paper; a year with two sessions shows their average. Of the 71 questions, 38 MCQ, 15 MSQ, 18 NAT; 43 carry 2 marks.
| Measure | 20172 papers | 2018 | 2019 | 2020 | 20212 papers | 2022 | 2023 | 20242 papers | 20252 papers | 20262 papers | Average |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Marks | 7 | 8 | 6 | 7 | 10.5 | 5 | 5 | 6.5 | 7.5 | 10 | 7.6 |
| Questions | 4.5 | 4 | 4 | 4 | 7 | 3 | 3 | 4 | 5 | 6 | 4.7 |
Algorithms topic-wise weightage
Every topic of the official syllabus, most marks first. Year columns show marks per paper; marks count each question once, under its main topic, while “Questions” also counts supporting topics.
| Topic | 20172 papers | 2018 | 2019 | 2020 | 20212 papers | 2022 | 2023 | 20242 papers | 20252 papers | 20262 papers | Marks | Questions | Share |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Graph traversals, minimum spanning trees and shortest paths | 1.5 | 4 | 2 | 6 | 3.5 | 2 | 2 | 4 | 5 | 6 | 56 | 32 | |
| Asymptotic worst-case time and space complexity | 3 | – | – | 1 | 2.5 | 3 | 3 | 2 | 0.5 | 2.5 | 28 | 21 | |
| Searching, sorting and hashing | 2 | – | 1 | 1 | 2 | 1 | 1 | – | 3 | 1.5 | 21 | 16 | |
| Algorithm design techniques: greedy, dynamic programming and divide-and-conquer | 1.5 | 4 | 3 | – | 3.5 | – | – | 0.5 | – | 1 | 20 | 14 |
Algorithms PYQs by topic
Newest first. A question can appear under up to three topics; one filed under another subject is marked with that subject.
Graph traversals, minimum spanning trees and shortest paths
32 questions · 56 marks as main topic · asked in 10 of 10 years · last in 2026
- 2026 Session 1 · Q41Shortest paths with at most k edges: two statements2M · MCQ
- 2026 Session 1 · Q47Condition forcing a vertex into every minimum vertex cover2M · MSQ
- 2026 Session 1 · Q49Cycle and cut properties of MSTs with distinct weights2M · MSQ
- 2026 Session 1 · Q50Impossible DFS discovery/finish orderings for a DAG edge2M · MSQ
- 2026 Session 1 · Q55Properties of 2-colorable (bipartite) graphs2M · MSQ
- 2026 Session 2 · Q37Fastest single-source shortest paths in a weighted DAG2M · MCQ
- 2025 Session 1 · Q18Shortest distances in a graph versus its MST1M · MCQ
- 2025 Session 1 · Q43BFS tree height when the graph diameter is 302M · MCQ
- 2025 Session 1 · Q64Largest x keeping edge BC in every MST2M · NAT
- 2025 Session 2 · Q29True statements about BFS and DFS trees of an undirected graph1M · MSQ
- 2025 Session 2 · Q37MSTs and shortest paths after adding α to every edge2M · MCQ
- 2025 Session 2 · Q59Output of the double-BFS algorithm on a given tree2M · NAT
- 2024 Session 1 · Q45Edge types when a DFS tree is also a BFS tree2M · MSQ
- 2024 Session 1 · Q60Connected components from the size of a DFS forest2M · NAT
- 2024 Session 2 · Q51Edge weights when every spanning tree has even weight2M · MSQ
- 2024 Session 2 · Q59Count the minimum spanning trees of a weighted graph2M · NAT
- 2023 · Q56Number of BFS orderings from ∅ in the subset graph of {1, 2, 3}2M · NAT
- 2022 · Q49MST facts for a graph with distinct edge weights2M · MSQ
- 2021 Set 1 · Q27Number of minimum spanning trees of a 3×3 grid graph1M · NAT
- 2021 Set 1 · Q51Articulation points and the DFS tree2M · MSQ
- 2021 Set 2 · Q11Minimum weight edge in every MST; distinct weights give unique MST1M · MCQ
- 2021 Set 2 · Q26BFS vs DFS: first three nodes of a 7-node complete binary tree1M · NAT
- 2021 Set 2 · Q56Properties of a directed 4×4 grid graph from vertex S2M · MSQ
- 2021 Set 2 · Q65Sum of maximum-product path scores in a weighted DAGsupporting · 2M · NAT
- 2020 · Q41Checking whether an MST survives the addition of one edge2M · MCQ
- 2020 · Q50Shortest paths under the reweighting w'(u,v) = w(u,v) + f(u) − f(v)2M · MCQ
- 2020 · Q59MST weight of a complete graph with weights |i − j|2M · NAT
- 2019 · Q48Conditions that guarantee a unique minimum spanning tree2M · MCQ
- 2018 · Q40Cross edges in DFS tree and level differences in BFS tree2M · MCQ
- 2018 · Q57Choosing x to maximize number of minimum spanning trees2M · NAT
- 2017 Session 1 · Q36Distinct positive weights: unique MST? unique shortest paths?2M · MCQ
- 2017 Session 2 · Q25Possible BFS visiting order of a six-node graph1M · MCQ
Asymptotic worst-case time and space complexity
21 questions · 28 marks as main topic · asked in 9 of 10 years · last in 2026
- 2026 Session 1 · Q17Solve nested recurrences T1 = 4T1(n/2) + T2, T2 = 5T2(n/4) + log n1M · MCQ
- 2026 Session 2 · Q24Order n^(1/3), log n, log(n!), 2^(log n) by growth rate1M · MCQ
- 2026 Session 2 · Q25Recurrences that solve to Θ(n)1M · MSQ
- 2026 Session 2 · Q38Checking that consecutive differences strictly increase2M · MCQ
- 2025 Session 1 · Q20Solve T(n) = 2T(n−1) + n·2^n1M · MCQ
- 2024 Session 1 · Q17Worst-case complexity of a single-pass sortedness check1M · MCQ
- 2024 Session 1 · Q42Solve T(n) = √n T(√n) + n2M · MCQ
- 2024 Session 2 · Q15Growth of T(n) = 5T(n−1) − 6T(n−2) with T(0)=1, T(1)=21M · MCQ
- 2023 · Q29Asymptotic relations between f(n) = n and g(n) = n²1M · MSQ
- 2023 · Q54Comparing a halving loop with a 100n loop2M · MSQ
- 2022 · Q11Asymptotic relation between f(n²) and (f(n))²1M · MCQ
- 2022 · Q51Values of a recurrence on 2n and 2n + 12M · MSQ
- 2021 Set 1 · Q13Order 10^n, n^(log n), n^(sqrt n) by growth rate1M · MCQ
- 2021 Set 1 · Q40Solve T(n) = T(n/2) + T(2n/5) + 7n2M · MCQ
- 2021 Set 2 · Q49Master theorem cases for T(n) = aT(n/b) + f(n)2M · MCQ
- 2020 · Q12Solve T(n) = T(n^(1/a)) + 1 with T(b) = 11M · MCQ
- 2019 · Q47Worst-case time to find the median of medians of n arrays of size nsupporting · 2M · MCQ
- 2017 Session 1 · Q14Order functions by growth: 10, √n, n, log n, 100/n1M · MCQ
- 2017 Session 2 · Q13Match Hanoi, binary search, heap sort, matrix addition to complexities1M · MCQ
- 2017 Session 2 · Q40Solve T(n) = 2T(√n) + 12M · MCQ
- 2017 Session 2 · Q48Time complexity of nested loop with step i2M · MCQ
Searching, sorting and hashing
16 questions · 21 marks as main topic · asked in 8 of 10 years · last in 2026
- 2026 Session 1 · Q24Empty slots after linear-probing inserts with h(x) = (x+7) mod 11Programming & DS · 1M · MSQ
- 2026 Session 2 · Q30Longest chain in a hash table with h(k) = k mod 9Programming & DS · 1M · NAT
- 2026 Session 2 · Q32Number of 'void' merges in merge sort of an 8-element array1M · NAT
- 2025 Session 1 · Q33Swaps made by bubble sort on a reversed array of 301M · NAT
- 2025 Session 1 · Q65Slot of key 24 under double hashingProgramming & DS · 2M · NAT
- 2025 Session 2 · Q20Comparisons to find an element that is not the maximum1M · MCQ
- 2025 Session 2 · Q41Comparisons needed to search a bitonic array2M · MCQ
- 2023 · Q20Hashing strategy against an adversary maximising collisionsProgramming & DS · 1M · MCQ
- 2022 · Q16Expected keys per slot with two simple uniform hash functionsProgramming & DS · 1M · MCQ
- 2021 Set 1 · Q19Fewest comparisons to sort an already sorted array1M · MCQ
- 2021 Set 1 · Q57Insertion order producing a given dynamic hashing stateProgramming & DS · 2M · MSQ
- 2021 Set 2 · Q18Arithmetic operations in recursive binary search1M · MCQ
- 2020 · Q33Probe 1 address under double hashing for key 90Programming & DS · 1M · NAT
- 2019 · Q30Quicksort on 25 distinct elements: probability pivot lands in worst location1M · NAT
- 2017 Session 1 · Q58Worst-case probes to find the first 1 in a sorted 0/1 array of 31 elements2M · NAT
- 2017 Session 2 · Q53Output of a bidirectional bubble sort snippetProgramming & DS · 2M · NAT
Algorithm design techniques: greedy, dynamic programming and divide-and-conquer
14 questions · 20 marks as main topic · asked in 6 of 10 years · last in 2026
- 2026 Session 1 · Q17Solve nested recurrences T1 = 4T1(n/2) + T2, T2 = 5T2(n/4) + log nsupporting · 1M · MCQ
- 2026 Session 2 · Q32Number of 'void' merges in merge sort of an 8-element arraysupporting · 1M · NAT
- 2026 Session 2 · Q39Row-wise vs anti-diagonal order for filling a DP table2M · MCQ
- 2024 Session 2 · Q35Minimum replacements to make an array non-decreasing1M · NAT
- 2021 Set 1 · Q12Comparisons needed to find both minimum and maximum1M · MCQ
- 2021 Set 1 · Q50Rod cutting: maximum revenue for a rod of length 72M · MSQ
- 2021 Set 2 · Q36Minimum encoded length of abbccddeee with a prefix code2M · MCQ
- 2021 Set 2 · Q65Sum of maximum-product path scores in a weighted DAG2M · NAT
- 2019 · Q35Maximum subarray sum of a 14-element sequence1M · NAT
- 2019 · Q47Worst-case time to find the median of medians of n arrays of size n2M · MCQ
- 2018 · Q41Explicitly computed pairs in optimal matrix chain parenthesization of five matrices2M · MCQ
- 2018 · Q58Optimal minus greedy value for 0/1 knapsack with capacity 112M · NAT
- 2017 Session 1 · Q15Match Kruskal, Quicksort, Floyd–Warshall to design paradigms1M · MCQ
- 2017 Session 2 · Q60Expected Huffman-encoded length of a 100-character message2M · NAT