#3392
Count Subarrays of Length Three With a Condition
pupil · 370 · lc easy +23 · 61.5% accepted · 301 likes · top 62%
Description
Given an integer array nums, return the count of length-3 subarrays in which the sum of the first and third elements equals exactly half the second element.
Code
1
2
3