11 ms·
Btrees can be really simple, I've written a super simple understandable readable btree here in python. https://github.com/samsquire/btree https://github.com/sa
by samsquire 5y ago
Btrees can be really simple, I've written a super simple understandable readable btree here in python.
https://github.com/samsquire/btree https://github.com/samsquire/btree
It doesn't balance between neighbours on the left and right like some btrees do but it handles splits in a really simple way and balances otherwise.
I would recommend everybody write the core algorithm in a simple language like Python first to get the core algorithm understood before trying to implement in a low level language like C or Rust.