Why is the median the best single value to 'balance' an array — the point that minimizes the sum of absolute differences? Write a proof.
Why is the median the best single value to 'balance' an array — the point that minimizes the sum of absolute differences? Write a proof.
Opens with the full question.