Advanced search trees Flashcards

1
Q

M-ary tree

A

A binary search tree expansion where each node has up to m children, and m-1 keys.

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

M-ary tree height

A

If all the nodes are full, then the tree’s height is O(logm(n)). (m-degree of the tree, n-number of different nodes)

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

B-tree

A
  1. An m-ary tree
  2. Each non root, non leaf node has at least m/2 children.
  3. All leafs are at the same level.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

B-tree insertion (idea)

A

Insert in a similar fashion to a BST. If the node is full, divide it into two, and send the median up. if it is also full do the same recursively.

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

B-tree deletion from leaf (idea)

A

If the node still has a least (m/2 - 1) -> done.
Else -> Try taking from a sibling node.
Not possible -> Merge with sibling node.

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

B-tree deletion from non leaf node (idea)

A

Find the successor found in the leaf and replace it.

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

B-tree run time costs

A

All actions done in O(logn)

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

2-3 trees

A

B trees where the degree m=3

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