Problem 2918 · Medium

Minimum Equal Sum of Two Arrays After Replacing Zeros

Each zero must become at least 1, so compare the two minimum sums and let a zero-containing array absorb the difference.

Open the interactive visualisation