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: inserts split nodes upwards and deletes merge them, so all leaves always stay at the same depth. That guarantees every search, from root to leaf, takes the same number of steps, logarithmic in the number of keys.

Paths differing by at most 1 is the AVL tree's notion of balance, not the B+ tree's. B+ tree nodes only need to be at least half full, so sibling nodes can differ in their number of children or records by more than 1.

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

Post your comment

Please log in or register to post a comment.