Leetcode Biweekly contest 128 | Find the Number of Subarrays Where Boundary Elements Are Maximum