Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You have n super washing machines on a line. Initially, each washing machine has some dresses or is empty. For each move, you could choose
You have n super washing machines on a line. Initially, each washing machine has some dresses or is empty.
For each move, you could choose any washing machines, and pass one dress of each washing
machine to one of its adjacent washing machines at the same time.
Given an integer array representing the number of dresses in each washing machine from left to right
on the line, return the minimum number of moves to make all the washing machines have the same number of
dresses. If it is not possible to do it return
Example :
Example :
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started