GO-V.ORG
As seen in

Order statistic tree

In computer science, an order statistic tree is a variant of the binary search tree (or more generally, a B-tree ) that supports two additional operations 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.[src] its index in the sorted list of elements of the tree Both operations can be performed in worst case time when a self-balancing tree is used as the base data structure.[src]

In computer science, an order statistic tree is a variant of the binary search tree (or more generally, a B-tree ) that supports two additional operations 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.[src] its index in the sorted list of elements of the tree Both operations can be performed in worst case time when a self-balancing tree is used as the base data structure.[src] ==Augmented search tree implementation== To turn a regular search tree into an order statistic tree, the nodes of the tree need to store one additional value, which is the size of the subtree rooted at that node (i.e., the number of nodes below it).[src] All operations that modify the tree must adjust this information to preserve the invariant that size[x] = size[left[x + size[right[x + 1 where size[nil] = 0 by definition.[src] Select can then be implemented as function Select(t, i) // Returns the i'th element (one-indexed) of the elements in t p ← size[left[t +1 if i = p return t else if i + 1 y ← x while y ≠ T.root if y = right[p[y r ← r + size[left[p[y ] + 1 y ← p[y] return r Order-statistic trees can be further amended with bookkeeping information to maintain balance (e.g., tree height can be added to get an order statistic AVL tree, or a color bit to get a red–black order statistic tree).[src] Alternatively, the size field can be used in conjunction with a weight-balancing scheme at no additional storage cost.[src] ==References== ==See also== Implicit treap Segment tree can be used for counting queries, and rank is a counting query, as if each node stores 1 and they are summed from beginning to element ==External links== Order statistic tree on PineWiki, Yale University.[src] The Python package blist uses order statistic B-trees to implement lists with fast insertion at arbitrary positions.[src] G++ extension to STL: Policy-Based Data Structures.[src] tree_order_statistics_node_update extension for ordered tree-based containers[src]

12 sentences · 12 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Order statistic tree." encyclopegia.org, 2025, https://encyclopegia.org/wiki/order-statistic-tree. Accessed 05 December 2026.

Chicago

"Order statistic tree." encyclopegia.org. Accessed December 5, 2026. https://encyclopegia.org/wiki/order-statistic-tree.

APA

encyclopegia.org. (2025). Order statistic tree. Retrieved December 5, 2026, from https://encyclopegia.org/wiki/order-statistic-tree

Accessed December 5, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Order of the British Empire

stub · references available

Ti -Tree

stub · references available

Order of Railroad Telegraphers

stub · references available

Corinthian order

stub · references available

Siberian Tree Frog

stub · references available

Olive-tree Warbler

stub · references available

Order of African Redemption

stub · references available

Order of the Golden Spur

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1328685233 · 0.5 · snapshot enwiki-001328685233

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.