Search
⌘K

Leetcode 2850. Minimum Moves to Spread Stones Over Grid

Given a 3x3 grid containing nine stones (possibly stacked), compute the minimum number of adjacent side moves needed to reach a configuration with exactly one stone in each cell. This is equivalent to assigning each stone to a unique target cell while minimizing total Manhattan distance — solvable with min-cost bipartite matching or min-cost flow.


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.