There are n washing machines arranged in a line. You are given an integer array machines where machines[i] denotes the number of dresses in the
In a single move, you can select any subset of machines and simultaneously transfer
Return the minimum number of moves needed to equalize the number of dresses in all washing machines. If it is impossible to make every machine contain an equal number of dresses, return
Constraints:
n machines.length
n
machines[i]
There are n washing machines arranged in a line. You are given an integer array machines where machines[i] denotes the number of dresses in the
In a single move, you can select any subset of machines and simultaneously transfer
Return the minimum number of moves needed to equalize the number of dresses in all washing machines. If it is impossible to make every machine contain an equal number of dresses, return
Constraints:
n machines.length
n
machines[i]