3392. Count Subarrays of Length Three With a Condition
Given an integer array
nums
, return the number of subarrays of length 3 such that the sum of the first and third numbers equals exactly half of the second number.A subarray is a contiguous non-empty sequence of elements within an array.
1 | func countSubarrays(nums []int) int { |