Congratulations! You have built an entire B-Tree from scratch!
To review, we have implemented the following methods in
Your fully functioning B-Tree code is in the code editor. Feel free to create your own B-Trees and practice using the methods.
For some guidance, here are some ways you can play around with the code:
btree = BTree(3) btree.insert(2) btree.insert(3) btree.insert(4) btree.insert(5) btree.insert(6) btree.insert(1) print(btree.root.keys) print(btree.root.children) print(btree.search(2))
node1 = BTreeNode(5) node1.keys = [1, 4, 29] node2 = BTreeNode(5) node2.keys = [2,3] node3 = BTreeNode(5) node3.keys = [5,6] node1.children = [node2, node3] node4 = BTreeNode(5) node4.keys =  node1.add_child(node4)
Feel free to try out both of these code blocks and get creative. Happy coding!