The essential part of Heap sort is construction of max-heap. Consider the tree shown below, the node 24 violates the max-heap property. Once heapify procedure is applied to it, which position will it be in?

The essential part of Heap sort is construction of max-heap. Consider the tree shown below, the node 24 violates the max-heap property. Once heapify procedure is applied to it, which position will it be in? Correct Answer 9

In max-heap element at each node is smaller than or equal to the element at its parent node. On applying the heapify procedure on item at position 2, it will be in position 9 as shown below.
Bissoy MCQ

Related Questions

The following lines talks about deleting a node in a binary tree.(the tree property must not be violated after deletion) i) from root search for the node to be deleted ii) iii) delete the node at what must be statement ii) and fill up statement iii)
Find the node voltage VA.
Branch, Loop and Node Analyses mcq question image
Find the node voltage VA.
Branch, Loop and Node Analyses mcq question image