Added cartesian tree

Probably needs to be updated...