Consider the array A=<4, 1, 3, 2, 16, 9, 10, 14, 8, 7>. After building heap from the array A, the depth of the heap and the right child of max-heap are ______ and _____ respectively (Root is at level 0).
Option (2) 3,10
Answer is (2). 3,10
This is max heap and right of root is 10.
The depth is no. of edge from root to given node so depth is 3
option b) is correct
64.3k questions
77.9k answers
244k comments
80.0k users