Re:B-Trees Require Fewer Comparisons Than Balanced Binary Se...
by nayuki on Monday June 24, 2024 @01:25PM
(#40778627)
B-tree deletions are quite complicated too, requiring stealing keys from either-side sibling or merging with either-side sibling.
In practice, I find that a B-tree implementation is 2 to 3× the length of an AVL tree impl.
I also fuzz-tested my implementations thoroughly. https://www.nayuki.io/page/avl-tree-list , https://www.nayuki.io/page/btree-set , etc.
Recently implemented them for an advanced hobby project and having a solid fuzzing tester in place really alleviated a lot of headaches in the long term since it was able to produce quite an exhaustive set of conditions.