Problem 3113 · Hard

Find the Number of Subarrays Where Boundary Elements Are Maximum

Count the subarrays whose first and last values both equal the largest value inside them. The visual highlights the maximum of each window and marks matching boundary values.

Open the interactive visualisation