LeetCodeSmallest Range ISmallest Range IEasyArrayMathSolution export function smallestRangeI(nums: number[], k: number): number { const [max, min] = nums.reduce( (prev, num) => [Math.max(prev[0], num), Math.min(prev[1], num)], [nums[0], nums[0]], ); return Math.max(0, max - min - 2 * k); }LeetCodeSmallest Range Ihttps://leetcode.com/problems/smallest-range-i