[LeetCode] Smallest Range II

1 · · Feb. 10, 2021, 12:52 p.m.
910. Smallest Range II Given an array A of integers, for each integer A[i] we need to choose either x = -K or x = K, and add x to A[i] (only once). After this process, we have some array B. Return the smallest possible difference between the maximum value of B and the minimum value of B. ...