Data Structures and Algorithms Part 2
A __________ (with no duplicate elements) has the property that for every node in the tree the
value of any node in its left subtree is less than the value of the node and the value of any node
in its right subtree is greater than the value of the node. - Correct Answers-binary search tree
The _______ of a nonempty tree is the length of the path from the root node to its furthest leaf
+ 1. - Correct Answers-height
The time complexity for searching an element in a binary search tree is _______. - Correct
Answers-O(n)
The time complexity for inserting an element into a binary search tree is _______. - Correct
Answers-O(n)
The time complexity for deleing an element into a binary search tree is _______. - Correct
Answers-O(n)
The _________ of a node is the height of its right subtree minus the height of its left subtree. -
Correct Answers-balance factor
The balance factor of every node in an AVL tree may be _________. - Correct Answers-0
1
-1
The time complexity for insertion, deletion, and search is O(logn) for a ___________. - Correct
Answers-AVL tree
In a ________, the element just inserted is always at the leaf. - Correct Answers-binary search
tree
The average time-complexity for insertion, deletion, and search in a ________ is O(logn). -
Correct Answers-AVL tree
A collision occurs _____________. - Correct Answers-when two or more keys are mapped to
the same hash value.
Every object has the hashCode() method. - Correct Answers-True
A __________ (with no duplicate elements) has the property that for every node in the tree the
value of any node in its left subtree is less than the value of the node and the value of any node
in its right subtree is greater than the value of the node. - Correct Answers-binary search tree
The _______ of a nonempty tree is the length of the path from the root node to its furthest leaf
+ 1. - Correct Answers-height
The time complexity for searching an element in a binary search tree is _______. - Correct
Answers-O(n)
The time complexity for inserting an element into a binary search tree is _______. - Correct
Answers-O(n)
The time complexity for deleing an element into a binary search tree is _______. - Correct
Answers-O(n)
The _________ of a node is the height of its right subtree minus the height of its left subtree. -
Correct Answers-balance factor
The balance factor of every node in an AVL tree may be _________. - Correct Answers-0
1
-1
The time complexity for insertion, deletion, and search is O(logn) for a ___________. - Correct
Answers-AVL tree
In a ________, the element just inserted is always at the leaf. - Correct Answers-binary search
tree
The average time-complexity for insertion, deletion, and search in a ________ is O(logn). -
Correct Answers-AVL tree
A collision occurs _____________. - Correct Answers-when two or more keys are mapped to
the same hash value.
Every object has the hashCode() method. - Correct Answers-True