COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
The value of the right child should be greater than the root node.
|
|
The value of the left child should be less than the root node
|
|
The left and right subtrees should also be a binary search tree
|
|
None of the above
|
Detailed explanation-1: -1. Which of the following is false about a binary search tree? Explanation: In order sequence of binary search trees will always give ascending order of elements. Remaining all are true regarding binary search trees.
Detailed explanation-2: -Which of the following is incorrect with respect to binary trees? Explanation: In a binary tree, there are atmost 2k nodes in level k and 2k-1 total number of nodes. Number of levels is at least ceil(log(N+1)).
Detailed explanation-3: -The correct answer is option 4. Concept: Binary search tree: A binary search tree (BST) is a binary tree in which each node has a Comparable key (and an associated value) that is greater than the keys in all nodes in that node’s left subtree and less than the keys in all nodes in that node’s right subtree.
Detailed explanation-4: -Answer: Correct option is 3) If there are two numbers that are equal to the search item, it can pick any one of those depending on the implementation. Explanation: A binary search algorithm is an alternative to linear/sequential search algorithm.
Detailed explanation-5: -Which of the following is not an application of binary search? Explanation: In Binary search, the elements in the list should be sorted. It is applicable only for ordered list. Hence Binary search in unordered list is not an application.