Say you’re given an array of integers, and you want to calculate the sum of each element’s neighbors. Try it: Before going on, consider how you’d solve this yourself.

Related Articles