Home / GATE DA / Data structures and algorithms
GATE DA Data Structures and Algorithms PYQs with solutions
Every data structures and algorithms question from the GATE DA papers of 2026, 2025, 2024: 21 questions worth 30 marks. This covers sorting, searching, recurrences, trees, graphs, BFS and DFS, hashing and complexity. 6 are solved free; the rest are in the past-paper pack (₹499).
2026: 5 questions (7 marks) · 2025: 6 questions (9 marks) · 2024: 10 questions (14 marks)
GATE DA 2026
| Q.15 | Recurrence for randomized-input quicksort Quicksort expected time · 1 mark · MCQ | Pack |
| Q.25 | Rebuild a binary tree from pre-order and in-order Tree reconstruction from traversals · 1 mark · MSQ (more than one correct) | Pack |
| Q.31 | Worst-case comparisons for a missing key in 1000 items Binary search comparisons · 1 mark · Numerical answer | Pack |
| Q.40 | Reachability in G and its reverse Graph reversal and reachability · 2 marks · MCQ | Pack |
| Q.49 | Comparisons on a nearly sorted array Bubble vs insertion sort · 2 marks · MSQ (more than one correct) | Pack |
GATE DA 2025
| Q.18 | Where 14 and 15 land in a hash table Linear probing · 1 mark · MCQ | Free |
| Q.27 | When is worst-case binary search O(log n) Binary search requirements · 1 mark · MSQ (more than one correct) | Pack |
| Q.29 | Values of x giving exactly two swaps Insertion sort swaps · 1 mark · MSQ (more than one correct) | Free |
| Q.58 | Which edges cannot exist given three shortest paths Shortest paths · 2 marks · MSQ (more than one correct) | Pack |
| Q.64 | Sum produced by a push-then-pop loop Stack simulation · 2 marks · Numerical answer | Free |
| Q.65 | Vertices discovered after vertex 50 DFS discovery order · 2 marks · Numerical answer | Free |
GATE DA 2024
| Q.14 | Edge type when d[u] < d[v] in DFS DFS edge classification · 1 mark · MCQ | Pack |
| Q.16 | Match FIFO, lookup and LIFO Stacks, queues, hash tables · 1 mark · MCQ | Pack |
| Q.21 | Expected probes to insert with load factor α Open addressing hash tables · 1 mark · MCQ | Pack |
| Q.28 | Which traversal pairs pin down a full binary tree Tree reconstruction from traversals · 1 mark · MSQ (more than one correct) | Pack |
| Q.30 | Swaps when quicksort meets a sorted array Quicksort swaps · 1 mark · Numerical answer | Pack |
| Q.32 | Final value after deque operations Deque operations · 1 mark · Numerical answer | Free |
| Q.40 | Worst-case comparisons of binary search Binary search recurrence · 2 marks · MCQ | Pack |
| Q.45 | Which sorts finish [4, 3, 2, 1, 5] in two passes Sorting algorithm passes · 2 marks · MCQ | Free |
| Q.51 | Valid topological orders of a DAG Topological sort · 2 marks · MSQ (more than one correct) | Pack |
| Q.52 | Height, internal nodes and leaves of a binary tree Binary tree size bounds · 2 marks · MSQ (more than one correct) | Pack |
Other subjects
General Aptitude · Machine learning · Artificial intelligence · Programming · Databases · Probability and statistics · Linear algebra · Calculus and optimization