https://medium.com/@TechPanda/algo-interview-prep-10-minimum-cost-to-make-array-equal-hard-4fef971e36