Construct Cartesian Tree from Sequence

hard
Last edited: August 10, 2025