1. A binary search tree is a binary tree with the added property that the left c
ID: 3547845 • Letter: 1
Question
1. A binary search tree is a binary tree with the added property that the left child is less than the parent, which is less than or equal to the ___________.
A. Left child
B. Right child
C. Middle child
D. None of the above
2. The definition of a binary search tree is an extension of the definition of a ______________.
A. stack
B. queue
C. list
D. binary tree
3. Each BinaryTreeNode object maintains a reference to the element stored at that node as well as references to each of the node
Explanation / Answer
1)B
2)D
3)A
4)C
5)B
6)A
7)C
8)C
9)A
10)B
11)A
12)A
13)C
14)B
15)D
16)B
17)In binary search tree the left child must be less than parent and right child must be greater than parent and it should be binary tree
Left child < Parent < Right Child
Where there is no such convention for binary tree
The only rule for binary tree is every node of the tree should contain atmost two childs
18)Suppose the tree is of the following
3
/
/
2
/
/
1
The this imbalance is fixed by Single rotation
19)In max heap every child is less than its parent
Whereas in min heap every child is greater than its parent
20)In min heap every child is greater than parent but in binary search tree only one child is greater than parent ( other one is less than parent )
21)Set doesn't allow duplicates, while Map provides a data structure based on key value pair and hashing.
22) A graph is said to be complete if there exists a edge between any two vertices
That is ther should be n(n-1)/2 edges in the graph
where n is number of vertices in graph
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.