In binary heap, whenever the root is removed then the rightmost element of last level is replaced by the root. Why?
A. It is the easiest possible way.
B. To make sure that it is still complete binary tree.
C. Because left and right subtree might be missing.
D. None of these
Answer:B
In binary heap, whenever the root is removed then the rightmost element of last level is replaced by the root. Why?
A. It is the easiest possible way. B. To make sure that it is still complete binary tree. C. Because left and right subtree might be missing. D. None of these