GATE CS 2025 Set 1 | Question 35

Programming & Data Structures › Heaps · NAT · 1 mark · Answer: 5

  1. Question 35Programming & Data Structuresnat1 mark
    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 stores 32 keys. The height of is _____________. (Answer in integer)

    Answer: 5

    Solution

    Answer: 5 A heap is a complete binary tree, whose height (in edges) for nodes is .
    (Levels – hold nodes; the 32nd node sits on level , so the longest root-to-leaf path has 5 edges.)

More GATE PYQ on Heaps

All GATE CS Programming & Data Structures PYQ →

Attempt GATE CS 2025 Set 1 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →