Minimize Manhattan Distances

From LeetCode. Manhattan geometry. Solve the geometry problem "Minimize Manhattan Distances".

Examples
Input: [1,2,3]
Output: 0
Hints

Minimize Manhattan Distances

**From LeetCode.** Manhattan geometry. Solve the geometry problem "Minimize Manhattan Distances".