UGC NET JULY 2018 (Computer Science And Applications Paper-II) (Question 22)
Q 22. 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).
(1) 3, 14
(2) 3, 10
(3) 4, 14
(4) 4, 10
Answer : (2) 3, 10
According to second image Depth of Max-Heap = 3 (i.e. Level - 3)
And Right Child of Max-Heap = 10
Q 22. 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).
(1) 3, 14
(2) 3, 10
(3) 4, 14
(4) 4, 10
Answer : (2) 3, 10
According to second image Depth of Max-Heap = 3 (i.e. Level - 3)
And Right Child of Max-Heap = 10
0 comments:
Post a Comment