AlgorithmsData structuresEdit on GitHubEdit history
Cartesian Tree
1980
A binary tree built from a sequence so that it is a binary search tree with respect to positions and heap-ordered with respect to values. It can be built in linear time with a stack and is used to reduce range-minimum queries to lowest-common-ancestor queries.
Origin
Lineage
Parent algorithms
Structural analysisThe Cartesian tree satisfies binary-search-tree order on positions and heap order on values at the same time. — doi:10.1145/358841.358852
Derived algorithms
CitationThe treap is defined as a Cartesian tree with random priorities and cites Vuillemin's Cartesian trees.
Author statementThe paper uses the Cartesian tree to reduce general RMQ to the LCA problem. — doi:10.1007/10719839_9
Author statementThe Fischer–Heun method classifies blocks by Cartesian-tree shape so that they can share tables. — doi:10.1007/11780441_5
Notable implementations
No implementations registered yet. Try a repo scan to find some. Repo scan
Find more: GitHub · Semantic Scholar · Google Scholar · arXiv
Claims & disputes
Loading…