Introduction to Java Programming, Includes Data Structures, Eleventh Edition, Y. Daniel Liang

This quiz is for students to practice. A large number of additional quiz is available for instructors using Quiz Generator from the Instructor's Resource Website. Videos for Java, Python, and C++ can be found at https://yongdanielliang.github.io/revelvideos.html.

Chapter 26 AVL Trees


Section 26.1 Introduction
26.1  The _________ of a node is the height of its right subtree minus the height of its left subtree.
A. balance factor
B. depth
C. length
D. degree

26.2  The balance factor of every node in an AVL tree may be _________.
A. 0
B. 1
C. -1
D. 2

26.3  A(n) __________ (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.
A. binary tree
B. binary search tree
C. AVL tree
D. binary heap

Section 26.7 The AVLTree Class
26.4  In a(n) ________, the element j to be removed is always at the root.
A. binary tree
B. binary search tree
C. AVL tree
D. binary heap

26.5  In a(n) ________, the element just inserted is always at the leaf.
A. binary search tree
B. AVL tree
C. binary heap

26.6  What is the preorder traversal of the elements in a AVL tree after inserting 3, 4, 45, 21, 92, 12 in this order?
A. 3 4 12 21 92 45
B. 3 4 12 21 45 92
C. 45 4 3 21 12 92
D. 45 21 12 92 3 4
E. 21 4 3 12 45 92

Section 26.9 AVL Tree Time Complexity Analysis
26.7  The time complexity for insertion, deletion, and search is O(logn) for a ___________.
A. binary tree
B. binary search tree
C. AVL tree
D. binary heap

26.8  The average time-complexity for insertion, deletion, and search in a ________ is O(logn).
A. binary search tree
B. AVL tree
C. binary heap