You are given an array of positive integers nums.
Return the total number of subarrays where both the first and the last element are equal to the largest element in that subarray.
Constraints:
nums.length
nums[i]
You are given an array of positive integers nums.
Return the total number of subarrays where both the first and the last element are equal to the largest element in that subarray.
Constraints:
nums.length
nums[i]