Machine-translated by Google. Questions are authored in English.
Top

Discussion

B+ Trees are considered BALANCED because

  • A.the lengths of the paths from the root to all leaf nodes are all equal.
  • B.the lengths of the paths from the root to all leaf nodes differ from each other by at most 1.
  • C.the number of children of any two non-leaf sibling nodes differ by at most 1.
  • D.the number of records in any two leaf nodes differ by at most 1.

Answer: A

B+ trees are balanced because the lengths of the paths from the root to all leaf nodes are all equal.

A B+ tree grows and shrinks only at the root: when a node overflows it splits and pushes a key up, and when the root splits the tree gains one level everywhere at once. So every leaf is always at the same depth, which guarantees \(O(\log n)\) search, insertion and deletion.

A difference of at most one in path length is the balance condition of an AVL tree, not a B+ tree. The numbers of children of sibling nodes, and of records in leaves, may differ by much more than one; they need only stay between the minimum (about half full) and the maximum fan-out.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.