Get the latest tech news

Counted B-Trees (2017)


are one of the best known algorithms around. A full treatment of them is available in any good algorithms book.

They are a means of storing a sorted list of items, in such a way that single-item insertion, deletion and lookup all operate in log(N) time. Finally, a counted B-tree allows you to easily extract order statistics from a changing data set: percentiles and medians. I can't think of any circumstances in which you might want to insert and remove items from a data set while keeping a running track of the median value, but if you need to do it, counted B-trees will let you.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of trees

trees

Related news:

News photo

Not all graphs are trees

News photo

Modal is a matrioshka language based on pattern-matching to rewrite trees

News photo

Exploring batch caching of trees