A **Cartesian tree** is a binary tree that maintains two properties: 1. **Heap Property**: For each node in the tree, the value of the parent node is less than or equal to the values of its child nodes. This makes the Cartesian tree a type of min-heap. 2. **Binary Search Tree Property**: For a given sequence of elements, the Cartesian tree is constructed in such a way that the in-order traversal of the tree will yield the original sequence of elements.
New to topics? Read the docs here!