Minimum Operations to Make Array Equal to Target
Track the required differences; rises and falls in the same direction each cost one operation per unit, while opposite signs never share an operation.
Track the required differences; rises and falls in the same direction each cost one operation per unit, while opposite signs never share an operation.