Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Talk:Order statistic tree

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 10 years ago by Soronel~enwiki in topic Rope

Rank algorithm should be checked

[edit]

Anonymous user 178.4.21.216 broke the Select algorithm by making it one-indexed (in contradiction to the comment), then added a Rank algorithm as follows:

function Rank(T, x)
    // Returns the position of x in the linear sorted list of elements of the tree T
    r ← size[left[x]] + 1
    y ← x
    while y ≠ T.root
         if y = right[y.p]
              r ← r + size[left[y.p]] + 1
         y ← y.p
    return r

I'm not sure what y.p is supposed to be, a parent pointer? Also, this probably uses a one-indexed convention. QVVERTYVS (hm?) 14:37, 29 June 2014 (UTC)Reply

Rope

[edit]

Would the tree used by Rope (data structure) be considered a variant of an order statistic tree?

The rope's value/weight system seems like a very similar concept, just allowing a node to have a value other than 1.

Soronel~enwiki (talk) 07:23, 7 March 2016 (UTC)Reply