2-3 Search Tree Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is a 2-3 search tree?

A

Tree that is either empty or
* a 2-node, with one key and two links
* A 3-node with two keys and three links

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

at is

What are the amount of compares for Search and Insert in the worst case?

A

lg N

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

How do we search a 2-3 tree?

A

Self explanitory

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

How do we insert into a 2-node?

A

Replace node with 3 node containing its key and new key to be inserted

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

How do we insert into a 3 node?

A

There are three cases:
* Single 3-node: Create 4 -node, splut into 2-3 tree where middle key is at root.
* 2-node parent: Same as above, move middle up to create a new 3-node
* 3-node parent: Split up into parent, perform operation on parent

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