Home »
MCQs »
Data Structure and Algorithms (DSA) MCQs
Which of the following replaces the root in deletion operation of min heap?
20. Which of the following replaces the root in deletion operation of min heap?
- Next value of left subtree
- Next value of right subtree
- Any random value of tree
- Last element of last level
Answer
The correct answer is: D) Last element of last level
Explanation
Root level is always replaced by the last element of the last level regardless of max heap or min heap deletion operation.