return to top
source
O(n). depth t is the maximum number of nodes on any path to a leaf. It is an upper bound on most tree operations.
O(n)
depth t
depthLB c n is the best upper bound on the depth of any balanced red-black tree with root colored c and black-height n.
depthLB c n
c
n
depthUB c n is the best upper bound on the depth of any balanced red-black tree with root colored c and black-height n.
depthUB c n
A well formed tree has t.depth ∈ O(log t.size), that is, it is well balanced. This justifies the O(log n) bounds on most searching operations of RBSet.
t.depth ∈ O(log t.size)
O(log n)
RBSet