Data structures and algorithms:
- Cartesian Tree creation in linear time
- Euler Tour of a Tree: the implementation returns both the values of euler nodes as an array and the depths of euler nodes as an array. Euler Tour of depths of a tree is useful in RMQ queries.