GATE Programming and Data Structures: Binary Heaps – Previous Year Questions
21 GATE previous year questions on Binary Heaps (Programming and Data Structures, Computer Science) with answers and explanations, from every paper.
21 questions worth 33 marks in all (9 1-mark, 12 2-mark). Asked between 2007 and 2026, so you can see how the topic has been tested over time.
- GATE 2007 CS Q47 – A max-heap is an array. To insert a new element, binary search the path from new leaf to root for its position. How many comparisons are performed?
- GATE 2008 CS Q47 – A binary heap has n elements; insert n more, not necessarily one at a time. What total time is required?
- GATE 2009 CS Q59 – Consider a binary max-heap implemented as an array. Which array is a max-heap?
- GATE 2009 CS Q60 – Consider a binary max-heap implemented as an array. Starting with the correct heap from Q59, what array remains after two delete-max operations?
- GATE 2021 CS (CS2) Q12 – A binary min-heap of n elements is stored in an array. Find the worst-case complexity of an optimal algorithm to find its maximum.
- GATE 2015 CS (CS3) Q30 – Find the minimum number of interchanges needed to convert the level-order array [89,19,50,17,12,15,2,5,7,11,6,9,100] into a max-heap.
- GATE 2015 CS (CS2) Q22 – A complete binary tree has max-heaps as the left and right subtrees of its root. Which lower bound describes operations to convert the whole tree to a…
- GATE 2011 CS Q33 – A max-heap has parent values at least their children’s values. Which displayed tree is a max-heap?
- GATE 2016 CS (CS2) Q44 – A complete binary min-heap contains each integer 1 through 1023 once. Root depth is zero. Find the greatest depth of integer 9.
- GATE 2014 CS (CS2) Q22 – A max-heap priority queue initially has level order 10,8,5,3,2. Insert 1 then 7. Find the resulting level order.
- GATE 2016 CS (CS1) Q47 – An operator `delete(i)` for a binary heap data structure is to be designed to delete the item in the i-th node. Assume that the heap is implemented in…
- GATE 2015 CS (CS1) Q37 – Consider a max heap, represented by the array: 40, 30, 20, 10, 15, 16, 17, 8, 4. Array Index 1 2 3 4 5 6 7 8 9 --- --- --- --- --- --- --- --- --- ---…
- GATE 2018 CS Q56 – The number of possible min-heaps containing each value from \1,2,3,4,5,6,7\ exactly once is .
- GATE 2026 CS (CS1) Q23 – Let 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…
- GATE 2025 CS (CS1) Q35 – The 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…
- GATE 2024 CS (CS1) Q41 – An 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…
- GATE 2024 CS (CS1) Q43 – Consider 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.…
- GATE 2023 CS Q12 – Which one of the following sequences when stored in an array at locations A[1],...,A[10] forms a max-heap?
- GATE 2023 CS Q46 – Let 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)…
- GATE 2022 CS Q28 – Suppose a binary search tree with 1000 distinct elements is also a complete binary tree. The tree is stored using the array representation of binary…
- GATE 2020 CS Q57 – Consider the array representation of a binary min-heap containing 1023 elements. The minimum number of comparisons required to find the maximum in the…