Array Reduction 3 Leetcode 1508