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 6–10 of 32

Q6GATE 20231 markMCQ−0.33 if wrong
Which one of the following sequences when stored in an array at locations A[1], . . . , A[10] forms a max-heap?

Q7GATE 20232 marksMCQ−0.67 if wrong
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) extracts and deletes the maximum element from A. The operation Insert(A,key) inserts a new element key in A. The properties of a max-heap are preserved at the end of each of these operations.
When A contains n elements, which one of the following statements about the worst case running time of these two operations is TRUE?

Q8GATE 2021 (Session 2)1 markMCQ−0.33 if wrong
Let 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 element in H?

Q9GATE 20202 marksNAT
Consider 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 ___________.

Q10GATE 20192 marksMCQ−0.67 if wrong
Consider 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 child of the root node.
III. A max-heap can be constructed from a binary search tree in Θ(n)\Theta (n) time.
IV. A binary search tree can be constructed from a max-heap in Θ(n)\Theta (n) time.

Which of the above statements is/are TRUE?

Keep practising

Topics in Data Structures

All CS topics ›