Array Reduction 3 Leetcode 1501