

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Quiz; Professor: Heeren; Class: Data Structures; Subject: Computer Science; University: University of Illinois - Urbana-Champaign; Term: Fall 2007;
Typology: Quizzes
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Friday, October 26
In an n node AVL tree, the insertion and removal operations require how many rotations to rebalance the tree in the worst case? (a) O(log n) for both (b) O(log n) for insertion and O(n) for removal (c) O(log n) for insertion and exactly 1 rotation for removal (d) O(1) for insertion and O(log n) for removal
A non-root internal node in an order m B-tree has how many children? (a) m (b) m − 1 (c) between ⌈ m 2 ⌉ and m (d) between 2 and m
True or False: An AVL Tree is a minimal height Binary Search Tree. (a) True (b) False
A right-left rotation is used to rebalance the following AVL tree. Four potential solutions are shown below. Which solution acurately portrays the result of applying the right-left rotation to node M?
Initial Tree:
Solution 1: Solution 2:
Solution 3: Solution 4:
(a) solution 1 (b) solution 2 (c) solution 3 (d) solution 4
Keeping a parent pointer in every node of an AVL tree would result in:
(a) O(n) time removals in the worst case and using O(n) more space (b) O(log n) time removals and insertions in the worst case and using O(n) more space (c) O(log n) time rotations on insertions in the worst case and using O(n) more space (d) Asymptotically faster traversals