Problem 3676 · Medium

Count Bowl Subarrays

Count subarrays whose two end values both exceed every value strictly inside them.

Open the interactive visualisation