Advanced Data Structures Project: A Python implementation to use cartesian trees to solve all nearest smaller values problem