Problem 3676 · Medium
Count subarrays whose two end values both exceed every value strictly inside them.
Open the interactive visualisation