Subject analysis · 2017–2026

Data Structures

Every GATE CS question on Data Structures, with how the marks are spread across years and topics.

Practise Data Structures

Questions

42

4 topics

Avg marks / year

6.2

62 marks over 10 years

Peak year

2026

13 marks

Trend

Rising

+133% last 3 yrs

Marks per year

Both shifts counted where there were two · peak highlighted

Rising +133%
avg 6.2
5
4
2
7
3
4
6
8
10
13
'17'18'19'20'21'22'23'24'25'26

Topic share

Share of Data Structures's 62 marks

4

topics

  • Binary Search Trees & Binary Heaps52%
  • Abstract Data Types , Stacks, Queues21%
  • Linked Lists & Binary Trees19%
  • BSTs & Binary Heaps8%

Topic × year heatmap

Marks from each topic in each year — darker is heavier. Topics that light up every column are the safest bets.

'17'18'19'20'21'22'23'24'25'26
Binary Search Trees & Binary Heaps3226213652
Abstract Data Types , Stacks, Queues11122222
Linked Lists & Binary Trees1111134
BSTs & Binary Heaps5
Recommended book · affiliate linkIntroduction to Algorithms (CLRS)The standard reference behind most GATE algorithm questions.

All 42 Data Structures questions

2026 8 questions · 13 marks
  1. FN · Q23Let n be an odd number greater than 100. Consider a binary minheap with n elements stored in an array P whose index starts from 1. Which of the following indic…BSTs & Binary Heaps · MSQ · 1 mark
  2. FN · Q33The height of a binary tree is the number of edges in the longest path from the root to a leaf in the tree. The maximum possible height of a full binary tree w…Linked Lists & Binary Trees · NAT · 1 mark
  3. FN · Q39Consider the following code snippet in C language that computes the number of nodes in a non-empty singly linked list pointed to by the pointer variable head .…Linked Lists & Binary Trees · MCQ · 2 marks
  4. FN · Q40Let P be the set of all integers from 1 to 15. Consider any order of insertion of the elements of P into a binary search tree that creates a complete binary tr…BSTs & Binary Heaps · MCQ · 2 marks
  5. FN · Q62The following sequence corresponds to the preorder traversal of a binary search tree: 50, 25, 13, 40, 30, 47, 75, 60, 70, 80, 77 The position of the element 60…BSTs & Binary Heaps · NAT · 2 marks
  6. AN · Q12The set T represents various traversals over binary tree. The set S represents the order of visiting nodes during a traversal. T I: Inorder II: Preorder III: P…Linked Lists & Binary Trees · MCQ · 1 mark
  7. AN · Q49Consider a binary search tree (BST) with n leaf nodes ( n > 0 ). Given any node V , the key present in the node is denoted as Val (V) . All the keys present in…Binary Search Trees & Binary Heaps · MSQ · 2 marks
  8. AN · Q50Consider a stack S and a queue Q . Both of them are initially empty and have the capacity to store ten elements each. The elements 1, 2, 3, 4, and 5 arrive one…Abstract Data Types , Stacks, Queues · MSQ · 2 marks
2025 7 questions · 10 marks
  1. FN · Q26Which of the following statement(s) is/are TRUE for any binary search tree (BST) having n distinct integers?Binary Search Trees & Binary Heaps · MSQ · 1 mark
  2. FN · Q35The height of any rooted tree is defined as the maximum number of edges in the path from the root node to any leaf node. Suppose a Min-Heap T stores 32 keys. T…Binary Search Trees & Binary Heaps · NAT · 1 mark
  3. FN · Q62Let LIST be a datatype for an implementation of linked list defined as follows: c typedef struct list int data; struct list next; LIST; Suppose a program has c…Linked Lists & Binary Trees · NAT · 2 marks
  4. AN · Q13Consider a binary tree T in which every node has either zero or two children. Let n > 0 be the number of nodes in T . Which ONE of the following is the number…Linked Lists & Binary Trees · MCQ · 1 mark
  5. AN · Q35Suppose the values 10, -4, 15, 30, 20, 5, 60, 19 are inserted in that order into an initially empty binary search tree. Let T be the resulting binary search tr…Binary Search Trees & Binary Heaps · NAT · 1 mark
  6. AN · Q38A meld operation on two instances of a data structure combines them into one single instance of the same data structure. Consider the following data structures…Binary Search Trees & Binary Heaps · MCQ · 2 marks
  7. AN · Q45Consider a stack data structure into which we can PUSH and POP records. Assume that each record pushed in the stack has a positive integer key and that all key…Abstract Data Types , Stacks, Queues · MSQ · 2 marks
2024 4 questions · 8 marks
  1. FN · Q41An array [82, 101, 90, 11, 111, 75, 33, 131, 44, 93] is heapified. Which one of the following options represents the first three elements in the heapified arra…Binary Search Trees & Binary Heaps · MCQ · 2 marks
  2. FN · Q43Consider a binary min-heap containing 105 distinct elements. Let k be the index (in the underlying array) of the maximum element stored in the heap. The number…Binary Search Trees & Binary Heaps · MCQ · 2 marks
  3. AN · Q39You are given a set V of distinct integers. A binary search tree T is created by inserting all elements of V one by one, starting with an empty tree. The tree…Binary Search Trees & Binary Heaps · MCQ · 2 marks
  4. AN · Q48Let S1 and S2 be two stacks. S1 has capacity of 4 elements. S2 has capacity of 2 elements. S1 already has 4 elements: 100, 200, 300, and 400 , whereas S2 is em…Abstract Data Types , Stacks, Queues · MSQ · 2 marks
2023 4 questions · 6 marks
  1. FN · Q12Which one of the following sequences when stored in an array at locations A[1], , A[10] forms a max-heap?Binary Search Trees & Binary Heaps · MCQ · 1 mark
  2. FN · Q13Let SLLdel be a function that deletes a node in a singly-linked list given a pointer to the node and a pointer to the head of the list. Similarly, let DLLdel b…Linked Lists & Binary Trees · MCQ · 1 mark
  3. FN · Q46Let A be a priority queue for maintaining a set of elements. Suppose A is implemented using a max-heap data structure. The operation Extract-Max( A ) extracts…Binary Search Trees & Binary Heaps · MCQ · 2 marks
  4. FN · Q59Consider a sequence a of elements a 0 = 1, a 1 = 5, a 2 = 7, a 3 = 8, a 4 = 9, and a 5 = 2. The following operations are performed on a stack S and a queue Q,…Abstract Data Types , Stacks, Queues · NAT · 2 marks
2022 3 questions · 4 marks
  1. FN · Q15Consider the problem of reversing a singly linked list. To take an example, given the linked list below: the reversed linked list should look like Which one of…Linked Lists & Binary Trees · MCQ · 1 mark
  2. FN · Q28Suppose a binary search tree with 1000 distinct elements is also a complete binary tree. The tree is stored using the array representation of binary heap trees…Binary Search Trees & Binary Heaps · NAT · 1 mark
  3. FN · Q62Consider the queues Q 1 containing four elements and Q 2 containing none (shown as the Initial State in the figure). The only operations allowed on these two q…Abstract Data Types , Stacks, Queues · NAT · 2 marks
2021 3 questions · 3 marks
  1. FN · Q20A binary search tree T contains n distinct elements. What is the time complexity of picking an element in T that is smaller than the maximum element in T?Binary Search Trees & Binary Heaps · MCQ · 1 mark
  2. FN · Q31Consider the following sequence of operations on an empty stack. push (54); push (52); pop ( ); push (55); push (62); s = pop ( ); Consider the following seque…Abstract Data Types , Stacks, Queues · NAT · 1 mark
  3. AN · Q12Let H be a binary min-heap consisting of n elements implemented as an array. What is the worst case time complexity of an optimal algorithm to find the maximum…Binary Search Trees & Binary Heaps · MCQ · 1 mark
2020 5 questions · 7 marks
  1. FN · Q15The preorder traversal of a binary search tree is 15, 10, 12, 11, 20, 18, 16, 19. Which one of the following is the postorder traversal of the tree?Binary Search Trees & Binary Heaps · MCQ · 1 mark
  2. FN · Q16What is the worst case time complexity of inserting n 2 elements into an AVL-tree with n elements initially?Binary Search Trees & Binary Heaps · MCQ · 1 mark
  3. FN · Q26What is the worst case time complexity of inserting n elements into an empty linked list, if the linked list needs to be maintained in sorted order?Linked Lists & Binary Trees · MCQ · 1 mark
  4. FN · Q51In a balanced binary search tree with n elements, what is the worst case time complexity of reporting all elements in range [a, b] ? Assume that the number of…Binary Search Trees & Binary Heaps · MCQ · 2 marks
  5. FN · Q57Consider the array representation of a binary min-heap containing 1023 elements. The minimum number of comparisons required to find the maximum in the heap is .Binary Search Trees & Binary Heaps · NAT · 2 marks
2019 1 questions · 2 marks
  1. FN · Q50Consider the following statements: I. The smallest element in a max-heap is always at a leaf node. II. The second largest element in a max-heap is always a chi…Binary Search Trees & Binary Heaps · MCQ · 2 marks
2018 3 questions · 4 marks
  1. FN · Q13A queue is implemented using a non-circular singly linked list. The queue has a head pointer and a tail pointer, as shown in the figure. Let n denote the numbe…Abstract Data Types , Stacks, Queues · MCQ · 1 mark
  2. FN · Q30The postorder traversal of a binary tree is 8,9,6,7,4,5,2,3,1. The inorder traversal of the same tree is 8,6,9,4,7,2,5,1,3. The height of a tree is the length…Linked Lists & Binary Trees · NAT · 1 mark
  3. FN · Q56The number of possible min-heaps containing each value from \ 1, 2, 3, 4, 5, 6, 7\ exactly once is .Binary Search Trees & Binary Heaps · NAT · 2 marks
2017 4 questions · 5 marks
  1. FN · Q6Let T be a binary search tree with 15 nodes. The minimum and maximum possible heights of T are: Note: The height of a tree with a single node is 0.Binary Search Trees & Binary Heaps · MCQ · 1 mark
  2. FN · Q8Consider the C code fragment given below. c typedef struct node int data; node next; node; void join (node m, node n) node p = n; while (p -> next != NULL) p =…Linked Lists & Binary Trees · MCQ · 1 mark
  3. AN · Q13A circular queue has been implemented using a singly linked list where each node consists of a value and a single pointer pointing to the next node. We maintai…Abstract Data Types , Stacks, Queues · MCQ · 1 mark
  4. AN · Q36The pre-order traversal of a binary search tree is given by 12, 8, 6, 2, 7, 9, 10, 16, 15, 19, 17, 20. Then the post-order traversal of this tree is:Binary Search Trees & Binary Heaps · MCQ · 2 marks