20. AVL Trees - 7 Questions

# 20. AVL Trees

7 Questions
Created by Y. Daniel Liang
Free
##### This Python quiz is aimed at students, enthusiasts and job seekers with little or no programming experience. It aims to provide them with an understanding of the role of computers and python programming language.
1. The _________ of a node is the height of its right subtree minus the height of its left subtree.

balance factor
depth
length
degree

2. The balance factor of every node in an AVL tree may be _________.

1. 0
2. 1
3. -1
4. 2

1, 2, 3
2, 3, 4
1, 3, 4
1, 2, 4

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.

1. binary tree
2. binary search tree
3. AVL tree
4. binary heap

1, 2
2, 3
3, 4
1, 4

4. The time complexity for insertion, deletion, and search is O(logn) for a ___________.

binary tree
binary search tree
AVL tree
binary heap

5. In a ________, the element j to be removed is always at the root.

binary tree
binary search tree
AVL tree
binary heap

6. In a ________, the element just inserted is always at the leaf.

binary search tree
AVL tree
binary heap
None of these