Problem 2143 · Medium

Choose Numbers From Two Arrays in Range

Track every way to pick one value per index so the two chosen sums are equal, keeping a tally of how far apart the sums are.

Open the interactive visualisation