# Median Minimizes Sum Of Absolute Deviations

<https://math.stackexchange.com/questions/113270/the-median-minimizes-the-sum-of-absolute-deviations-the-ell-1-norm>

If the array has odd number of elements, there is only a single median which minimizes the sum of absolute deviations.

If the array has even number of elements, any numbers between (including) the two median numbers minimizes the sum of absolute deviations.

* mean minimizes total distance for euclidian distance
* median minimzes total distance for absolute deviation
* mode minimizes distance for indicator function

## Problems

* [296. Best Meeting Point (Hard)](https://leetcode.com/problems/best-meeting-point/)
* [462. Minimum Moves to Equal Array Elements II (Medium)](https://leetcode.com/problems/minimum-moves-to-equal-array-elements-ii/)
* [2033. Minimum Operations to Make a Uni-Value Grid (Medium)](https://leetcode.com/problems/minimum-operations-to-make-a-uni-value-grid/)
