Search
⌘K

Leetcode 517. Super Washing Machines

Given an array of dress counts where in each move any subset of machines can simultaneously pass one dress from each selected machine to one adjacent neighbor, compute the minimum number of such parallel moves required to make all machines hold the same number of dresses (or return -1 if impossible). The core challenge is checking feasibility (total must be divisible by n) and reasoning about cumulative imbalances/local transfer requirements to derive the minimum rounds.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.