Jump to content

Order statistic tree

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Qwertyus (talk | contribs) at 10:29, 26 July 2012 (stub). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

In computer science, an order statistic tree is an augmented binary search tree that supports two additional operation beyond insertion, lookup and deletion:

  • Select(i) -- find the i'th smallest element stored in the tree
  • Rank(x) -- find the rank of element x in the tree, i.e. its index in the sorted list of elements of the tree

Both operations can be performed in O(log n) time in the average case; when a self-balancing tree is used as the base data structure, this bound also applies in the worst case.