Computer Sciences > Gate 2019 > Heap Data Structure
Consider the following statements:
Which of the above statements is/are TRUE?
I. The smallest element in a max-heap is always at a leaf node.
II. The second largest element in a max-heap is always a child of the root node.
III. A max-heap can be constructed from a binary search tree in ฮ(n) time.
IV. A binary search tree can be constructed from a max-heap in ฮ(n) time.
II. The second largest element in a max-heap is always a child of the root node.
III. A max-heap can be constructed from a binary search tree in ฮ(n) time.
IV. A binary search tree can be constructed from a max-heap in ฮ(n) time.
Which of the above statements is/are TRUE?
Explanation
Correct : a
Similar Questions
What is the worst-case time complexity of insertion in an AVL tree?
Which operations on a binary search tree have O(h) complexity?
Compare search complexities of sorted array vs balanced BST.