11 - AVL Trees

11 - AVL Trees

University

9 Qs

quiz-placeholder

Similar activities

Binary Search Tree

Binary Search Tree

University

7 Qs

DSA(UNIT 1) Test 1

DSA(UNIT 1) Test 1

University

10 Qs

Quiz on Data Structures

Quiz on Data Structures

University

12 Qs

Blockchain Basics: Algorithm and Techniques

Blockchain Basics: Algorithm and Techniques

University - Professional Development

12 Qs

QUIZ AI B 20221

QUIZ AI B 20221

University

10 Qs

rbtq

rbtq

University

5 Qs

Intro to AVL Trees

Intro to AVL Trees

University

12 Qs

Data Structure

Data Structure

University

10 Qs

11 - AVL Trees

11 - AVL Trees

Assessment

Quiz

Computers

University

Hard

Created by

Jason King

Used 73+ times

FREE Resource

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

When performing trinode restructuring in an AVL tree, which node should be labeled "Z"?
the first node at which the height-balance property is violated
the first node that would be visited in an inorder traversal
the child of the node where the height-balance property is violated
the traller grandchild of the node at which the height-balance property is violated

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

The goal of trinode restructuring is to ___.
balance the subtree
move "a" to be the root
move "c" to be the root
move "y" to be the root

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

In an AVL tree, for every internal node p, the heights of the children of the node p ______.
differ by at most 1
differ by at most 2
must be equal
must be different

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

Is the following tree an AVL tree?

no

yes

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

Is the following tree an AVL tree?

yes

no

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

Assume we deleted the left child of 10 (now replaced with a sentinel node in the tree below). What node should be labeled "Z"?

10

12

15

20

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

Assume we deleted the left child of 10 (now replaced with a sentinel node in the tree below). What node should be labeled "Y"?

15

10

12

20

8.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

Assume we deleted the left child of 10 (now replaced with a sentinel node in the tree below). What node should be labeled "X"?

20

10

12

sentinel

9.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the worst-case height of an AVL tree?
O(log n)
O(n)
O(n logn)
O(1)