Reduce The Array Leetcode