hi,i download your code and debug in my laptop,but i face IndexError: list index out of range
`def main(): B = BTree(2) ------ i changed
# Insert
customNo = 20 ------ i changed
for i in range(1,customNo+1):
B.insert((i, randint(i, 5 * i)))
B.printTree(B.root)
print()
`
when i run,i get the following error: `E:\workspace\PycharmProjects\B_and_Bplus_Tree\venv\Scripts\python.exe E:/workspace/PycharmProjects/B_and_Bplus_Tree/B-Tree.py Level 0 --> 1: (8, 31) Level 1 --> 1: (4, 10) Level 2 --> 1: (2, 6) Level 3 --> 1: (1, 4) Level 1 --> 1: (12, 30) Level 2 --> 1: (10, 19) Level 3 --> 1: (9, 22) Level 2 --> 3: (14, 32) (16, 42) (18, 25) Level 3 --> 1: (13, 14) Level 3 --> 1: (15, 27) Level 3 --> 1: (17, 58) Level 3 --> 2: (19, 76) (20, 71)
Key 12 deleted!
Traceback (most recent call last):
File "E:/workspace/PycharmProjects/B_and_Bplus_Tree/B-Tree.py", line 313, in
Process finished with exit code 1 `
There might have been some edge cases that I overlooked
@yuantianwen I fixed some stuff in B-Tree, do test it out and let me know if you still get any errors