3113. Find the Number of Subarrays Where Boundary Elements Are Maximum
You are given an array of positive integers
nums
.Return the number of subarrays of
nums
, where the first and the last elements of the subarray are equal to the largest element in the subarray.
c++
1 |
|
c++
1 |
|
c++
1 | class Solution { |