Minimum Moves to Spread Stones Over Grid
Pair each surplus stone with an empty cell by backtracking, pruning any branch whose total Manhattan distance already reaches the best answer.
Pair each surplus stone with an empty cell by backtracking, pruning any branch whose total Manhattan distance already reaches the best answer.