2-3-4 Tree

 Generally all the process is same as 2-3 Tree. So here we discuss the differences of 2-3-4 Tree from 2-3 Tree.


  • Every Node must have at least ceil(n/2 here 4/2) children and maximum 4 children that's why is is called 2-3-4 tree b/c it will have 2 or 3 or 4 child of a node.
  • Also called B-Tree of degree 4
  • Every node must be at same level

Representation:


Splitting:

        When we insert element while node is full we will have even(4) number of elements so we can't divide element uniformly for splitting. So either we put more element to right, i.e. right biased or to left i.e. left biased.

    Let we insert 40 in non-empty node: 



Comments

Popular posts from this blog

Insertion/Deletion in 2-3 Tree