In the file 'B-Tree.py'.
There are some code problem.
Details are as follows.
In function '_splitChild(self, x, i)',
t = self.t
y = x.children[i]
z = Node(y.leaf)
x.children.insert(i + 1, z)
x.keys.insert(i, y.keys[t - 1])
z.keys = y.keys[t: (2 * t) - 1]
y.keys = y.keys[0: t - 1]
if not y.leaf:
z.children = y.children[t: 2 * t]
y.children = y.children[0: t - 1]
In my view, the correct version is:
z.keys = y.keys[t:(2t)-1]; y.keys = y.keys[0:t-2]
z.children=y.children[t:2t];y.children=y.children[0:t-1]
In the file 'B-Tree.py'.
There are some code problem.
Details are as follows.
In function '_splitChild(self, x, i)',
In my view, the correct version is:
z.keys = y.keys[t:(2t)-1]; y.keys = y.keys[0:t-2]
z.children=y.children[t:2t];y.children=y.children[0:t-1]