Counted B-Trees (2017)

B-trees are a well-known algorithm for storing sorted lists efficiently. The addition of counted B-trees allows for lookups by numeric position, enabling the retrieval of ordering statistics in log time. This innovative enhancement allows for the easy extraction of percentiles and medians from a changing dataset. This unique feature makes counted B-trees ideal for applications such as storing editor buffers and database-like algorithms for query planning. With the ability to insert and delete items efficiently, counted B-trees provide flexibility and speed for a variety of use cases. An implementation of counted 2-3-4 trees in C is available for download.

https://www.chiark.greenend.org.uk/~sgtatham/algorithms/cbtree.html

To top