Contentstack interview question

Sum of adjacent array elements