Introduction to Programming Using Python, Y. Daniel Liang

Many questions in this edition have been updated in the new edition. Please check with the publisher on the newest edition.

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 20 AVL Trees


20.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

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

20.3  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.
A. binary tree
B. binary search tree
C. AVL tree
D. binary heap

Sections 29.2-29.9
20.4  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

20.5  In a ________, the element j to be removed is always at the root.
A. binary tree
B. binary search tree
C. AVL tree
D. binary heap

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

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