Prefix Sums and Two Pointers: The Array Tricks You Will Use Forever
Two techniques that turn a quadratic loop into a linear one, on the humblest data structure there is. Range sums in constant time, and the sliding window.
Problem Solving From Zero03