Updating Almost Complete Trees or One Level Makes All the Difference

An almost complete (or 2-complete) tree is a binary search tree in which any two external nodes are no more than two levels apart. While complete binary search trees have an amortized update cost of Θ(n), we demonstrate that almost complete binary search trees have an amortized update cost of O(log2n). Thus, they are an attractive alternative for those situations that require fast retrieval, that is, log n+O(1) comparisons, and have few updates.