Heap Tree: GATE CS Previous Year Questions

Heap Tree · Data Structures

32 questions · asked in 20 of 27 years (2000–2026)

MCQ 27 · MSQ 1 · NAT 41-mark 19 · 2-mark 13

2000Questions per year2026

Questions 11–15 of 32

Q11GATE 20182 marksNAT
The number of possible min-heaps containing each value from {1, 2, 3, 4, 5, 6, 7} exactly once is _____.

Q12GATE 2016 (Session 1)2 marksMCQ−0.67 if wrong
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 an array and i refers to the i-th index of thearray.If the heap tree has depth d (number of edges on the path from the root to the farthest leaf),the n what is the time complexity to re-fix the heap efficiently after the removal of the element?

Q13GATE 2016 (Session 2)2 marksNAT
A complete binary min-heap is made by including each integer in [1,1023] exactly once. The depth of a node in the heap is the length of the path from the root of the heap to that node. Thus, the root is at depth 0. The maximum depth at which integer 9 can appear is_____. .

Q14GATE 2015 (Session 1)2 marksMCQ−0.67 if wrong
Consider a max heap, represented by the array: 40, 30, 20, 10, 15, 16, 17, 8, 4.
Array Index Value 1 40 2 30 3 20 4 10 5 15 6 16 7 17 8 8 9 4
Now consider that a value 35 is inserted into this heap. After insertion, the new heap is

Q15GATE 2015 (Session 2)1 markMCQ−0.33 if wrong
Consider a complete binary tree where the left and the right subtrees of the root are max-heaps. The lower bound for the number of operations to convert the tree to a heap is

Keep practising

Topics in Data Structures

All CS topics ›