Get the latest tech news

B-Trees Require Fewer Comparisons Than Balanced Binary Search Trees


A blog by and for database architects.

Assuming we store n elements in a binary search tree, the lower bound for the number of comparisons is log 2 n in the worst case. One intuition for this result is that for larger k values, B-trees become increasingly similar to sorted arrays which achieve the log 2 n lower bound. Practical B-trees often use fairly large values of k(e.g., 100) and therefore offer tight bounds -- in addition to being more cache-friendly than binary search trees.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of trees

trees

Photo of fewer comparisons

fewer comparisons

Related news:

News photo

How to enumerate trees from a context-free grammar

News photo

Fast-charging sodium-ion battery uses anodes made from trees

News photo

Chickens in Trees