Leaves of the tree at the same level - B-tree

Q.  Leaves of which of the following trees are at the same level?
- Published on 22 Jun 15

a. Binary tree
b. B-tree
c. AVL-tree
d. Normal Tree

ANSWER: B-tree
 

    Discussion

  • Nihal   -Posted on 01 Apr 16
    Leaves of B-trees are at the same level. B-tree gives better performance than binary search tree if data is stored in external memory.

    B-tree must satisfy the following properties. Consider B-tree of order m.
    • All leaf nodes should be at the same level.
    • Every node, except for the root and the leaves, has at least m/2 children. If m = 5 then m/2 = 5/2 = 2.5, then the minimum number of children is 3. Choose the smallest integer which is greater than m/2.
    • Every node has a maximum of m children.
    • The root has at least two children (unless it is a leaf).

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)