Question
Download Solution PDFIn a max heap the smallest key is at :
Answer (Detailed Solution Below)
Detailed Solution
Download Solution PDFThe correct answer is: option 2: Leaf
Concept:
A max heap is a complete binary tree in which the value of each node is greater than or equal to its children. This ensures that the maximum key is at the root.
Key Properties of Max Heap:
- The largest element is always at the root.
- Values decrease as you move from the root to the leaves.
- Thus, the smallest element must be in one of the leaf nodes, as these are the furthest from the root and have no children.
Explanation of options:
- Option 1 – Root: ❌ Contains the largest key in a max heap.
- Option 2 – Leaf: ✅ Correct. The smallest key will be among the leaf nodes.
- Option 3 – Node: ❌ Too vague — all positions in the tree are nodes.
- Option 4 – Either root or node: ❌ Incorrect — only leaf node can guarantee smallest key in a max heap.
Hence, the correct answer is: option 2: Leaf
Last updated on Jul 3, 2025
-> NIELIT Scientific Assistant answer key 2025 has been released at the official website.
-> NIELIT Scientific Assistant admit card 2025 has been released.
-> NIELIT Scientific Assistant city intimation slip 2025 has been released at the official website.
-> NIELIT Scientific Assistant exam 2025 is scheduled to be conducted on June 28.
-> A total number of 113 revised vacancies have been announced for the post of Scientific Assistant in Computer Science (CS), Information Technology (IT), and Electronics & Communication (EC) streams.
-> Online application form, last date has been extended up to from 17th April 2025.
->The NIELT has revised the Essential Qualifications for the post of Scientific Assistant. Candidates must possess (M.Sc.)/ (MS)/ (MCA) / (B.E.)/ (B.Tech) in relevant disciplines.
-> The NIELIT Scientific Assistant 2025 Notification has been released by the National Institute of Electronics and Information Technology (NIELIT).