My implementation of B-tree and B+ tree with
- Odd size of non-leaf nodes
- Even size of leaf nodes in B+ tree (Odd in case of B-tree)
- Splitting only when necessary
I extended my B-Tree implementation so used same class for defining both leaf and non-leaf nodes. It simplified coding but I am storing some unnecessary information.