Machine-translated by Google. Questions are authored in English.
Top

Binary Search Trees Questions and Answers

Answer: D

All three statements describe a binary search tree, so the answer is All of the above.

In a binary search tree every item in the left subtree is less than the root, every item in the right subtree is greater than or equal to the root, and each subtree is itself a binary search tree, which is the recursive definition. Because (A), (B) and (C) are all parts of the definition, choosing any one of them is incomplete.

Please log in or register to report this question.

12.

The Inorder traversal of the tree will yield a sorted listing of elements of tree in

Exam Year(s)

UGC NET - 2012,

Answer: B

The inorder traversal yields a sorted listing for a binary search tree.

Inorder visits the left subtree, then the node, then the right subtree. In a binary search tree all values in the left subtree are smaller than the node and all values in the right subtree are larger, so the visit order is ascending. An ordinary binary tree (A) has no ordering of values, and a heap (C) only orders a parent against its children, so its inorder listing is not sorted.

Please log in or register to report this question.

Loading…

Other Subjects

Tags: Binary Search Trees Questions and Answers || Binary Search Trees MCQ Questions and Answers || Binary Search Trees GK Questions and Answers || Binary Search Trees GK MCQ Questions || Binary Search Trees Multiple Choice Questions and Answers || Binary Search Trees GK || GK on Binary Search Trees || Data Structures and Algorithms Questions and Answers || Data Structures and Algorithms MCQ Questions and Answers || Data Structures and Algorithms GK Questions and Answers || GK on Data Structures and Algorithms