Unit 6-Part 3 Flashcards

(6 cards)

1
Q

When does an AVL tree balance itself?

A

During the addition or removal of a node

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How long does searching take for an AVL tree?

A

O(logn)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How long does insertion take for an AVL tree?

A

O(logn)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which tree is more balanced? AVL or Red Black Trees?

A

AVL trees are more balanced
-but cause more rotations during insertions and deletions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which tree should be used when there frequent insertions and deletions?

A

Red-Black Trees

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which tree should be used when insertions and deletions are less frequent and search is more frequent?

A

AVL trees

How well did you know this?
1
Not at all
2
3
4
5
Perfectly