Array
3392. Count Subarrays of Length Three With a Condition
Given an array nums. Count the length-3 subarrays where the sum of the first and third elements equals half the middle (nums[i−1]+nums[i+1] == nums[i]/2).
Loading…
Given an array nums. Count the length-3 subarrays where the sum of the first and third elements equals half the middle (nums[i−1]+nums[i+1] == nums[i]/2).
Loading…