Zusammenfassung der Ressource
Frage 1
Frage
An AVL tree is an example of a balanced tree.
Frage 2
Frage
When the Avl is in a left left case which of these steps should you take
to correct the height of the tree ?
Antworten
-
A) Right
-
B) left
-
C) Left Right
-
D) Rgiht left
Frage 3
Frage
Why is a balance condition imporant in binary search trees like AVL?
Frage 4
Frage
What is a "balanced" binary tree?
Antworten
-
A) A tree whose leaves are all on the same depth
-
B) A complete and full tree
-
C) A tree whose left and right subtrees differ by at most 1 in depth
-
D) A binary tree cannot be balanced
Frage 5
Frage
What’s the average case for search? Worst case?
Antworten
-
O(log n); O(log n)
-
none of the above
Frage 6
Frage
What is an AVL tree?
Antworten
-
A) a tree with lots of leaves
-
B) a self balancing binary tree
-
C) there is no such thing
-
D) a tree with the parent being the smallest value
Frage 7
Frage
When inserting into an AVL tree, the first step is to insert a node in its proper place according to BST rules.
After BST insertion however, the tree is not guaranteed to be an AVL tree. What is the next step in the algorithm?
Antworten
-
A. if the new node is a left leaf, rotate left
-
B. update the height and determine the balance of the tree recursively
-
C. if the new node is a right leaf, rotate right
-
D. deconstruct the tree and build it again from scratch
Frage 8
Frage
What makes AVL trees different from Binary Search Trees?
Frage 9
Frage
What is an AVL tree visualization?
Antworten
-
A. an AVL tree is a self-balancing binary search tree.
-
B. an AVL tree is a non-balancing binary search tree.
-
C. an AVL tree is a back-balancing binary search tree.
-
D. an AVL tree is a front-balancing binary search tree.
Frage 10
Frage
An Adelson-Velskii Landis (AVL) tree is a self-balancing Binary Search Tree(BST) that maintains it's height to be O(log N) when having N vertices in the AVL tree.
Frage 11
Frage
When rotating an AVL tree which of the following are a case where you would need to rotate?
Antworten
-
A. left,left
-
B. left,right
-
C. right,right
-
D. right,left
-
E. All of the above
Frage 12
Frage
In average case, what is the efficiency of insertion of an AVL tree
Antworten
-
A. logn
-
B. nlogn
-
C. n
-
D. n2
Frage 13
Frage
What do AVL trees do?
Frage 14
Frage
What is the worst case possible height of AVL tree?
Antworten
-
A.n
-
B.n^2
-
C.1.44 log n
-
D.n+2
Frage 15
Frage
What is the term for AVL tree balancing?
Antworten
-
zig-zag
-
none of the above
Frage 16
Frage
What is the biggest height difference an AVL tree can have without rotating?