in DS
1,991 views
1 vote
1 vote
Consider the following statements.

 (i) In max Heap smallest element is at the leaf node.

(ii) In max Heap second largest element always the child of root.

(iii) Binary search tree can be constructed from max heap in θ(n).

(iv) Max Heap can be build from Binary search tree in θ(n)

Which of the above option is correct?

(a) (i), (ii) and (iii)

(b) (i), (ii) and (iv)

(c) (ii), (iii) and (iv)

(d) (i), (iii) and (iv)
in DS
2.0k views

4 Comments

I think 2 can be false what if elements are 9,9,9,7,8,5 then  root's children are not second largest.. correct me if I am wrong
0
0
You've a point here , then none of the options seem to be completely correct
0
0
If we could have a method to create a bst in O(n) then we could get sorted order of keys in O(n) thus breaking the lower bound of comparison based sorting.
0
0

Please log in or register to answer this question.