#3728
Stable Subarrays With Equal Boundary and Interior Sum
expert · 1150 · lc medium +32 · 26% accepted · 169 likes · top 4%
Description
Given an integer array capacity, return the number of subarrays capacity[l..r] of length at least 3 where both the first element and the last element equal the sum of all strictly interior elements.
Code
1
2
3