Q41. In an AVL tree, if balance factors are negative, we make a single left rota
ID: 3847585 • Letter: Q
Question
Q41. In an AVL tree, if balance factors are negative, we make a single left rotation.
a. true
b. false
Q42. The listing of the nodes produced by the inorder traversal of a binary tree is called the preorder sequence.
a. true
b. false
Q43. When deleting a node from a binary search tree you must consider three cases.
a. true
b. false
Q44. In an AVL tree, if the balance factors at a given position are positive, we can make ____.
a. a single left rotation only
b. a single right rotation only
c. a double rotation
d. either a single left rotation or a single right rotation
Q45. In a binary search tree, the average number of nodes visited in a search of T is approximately ____.
a. O(n log n)
b. O(n log2n)
c. O(n2 log2n)
d. O(log2n)
Q46. Duplicates are allowed in AVL trees.
a. true
b. false
Q47. If a binary tree x has two subtrees, left and right, which of the following must be true about left and right?
a. left and right are binary trees
b. left and right are lists
c. left and right are linked lists
d. left and right are queues
Q48. The ____ of a node in a binary tree is the number of branches on the path from the root to the node.
a. level
b. height
c. width
d. depth
Q49. With respect to binary trees, the recursive tree traversal functions are ____ than their iterative versions.
a. equally efficient
b. more efficient
c. less efficient
d. more complex
Q50. Each node in a binary tree contains data and a link to the left child and a link to the right child.
a. true
b. false
Explanation / Answer
41)
a)True.
That means that the tree is considered
"right heavy". We can correct this by performing w
hat is called a "left rotation".
42)
a)true
43)
a)True
conditions are:
t has no right hand child node
t has a right hand child but its right hand child node has no left subtree
t has a right hand child node and the ri
ght hand child node has a left hand child
node
44)
b)a single right rotation only
45)
b)O(n log2n)
46)
b)False
47)
a)Left and right are binary trees
48)
a)level
49)
b)more efficient
50)
a)true
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.