Problem 795 · Medium

Number of Subarrays with Bounded Maximum

Count the subarrays whose largest value lies between two thresholds. The visual slides endpoints across the array and marks which windows still qualify.

Open the interactive visualisation