COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
Assume there is a tree in which every node has a value greater than value of any node in its LST but lesserthan any node in its RST. An in order traversal of this tree shall result in
|
a sorted sequence in ascending order
|
|
a sorted sequence in descending order
|
|
sequence is sorted only of tree is a complete or full binary tree
|
|
sequence is not always sorted
|
Explanation:
Detailed explanation-1: -Max-Heap − Where the value of the root node is greater than or equal to either of its children.
Detailed explanation-2: -A max-heap is a complete binary tree in which the value in each internal node is greater than or equal to the values in the children of that node.
Detailed explanation-3: -Level Order Traversal Level order traversal follows BFS(Breadth-First Search) to visit/modify every node of the tree.
Detailed explanation-4: -Suppose there is a binary search tree that contains n number of nodes. So in this binary search tree, the maximum height will be “n-1", and the minimum height will be “ceil (log2n)".
There is 1 question to complete.