Cartesian tree

In computer science, a Cartesian tree is a binary tree derived from a sequence of distinct numbers. To construct the Cartesian tree, set its root to be the minimum number in the sequence, and recursively construct its left and right subtrees from the subsequences before and after this number.

Source: Wikipedia — Cartesian tree (CC BY-SA 4.0)

Cartesian tree

In computer science, a Cartesian tree is a binary tree derived from a sequence of distinct numbers. To construct the Cartesian tree, set its root to be the minimum number in the sequence, and recursively construct its left and right subtrees from the subsequences before and after this number.

This neuron ends here.

Source: Wikipedia "Cartesian tree" · CC BY-SA 4.0

Share this article: X · Bluesky
Privacy Policy