Problem 3928 · Medium

Minimum Cost to Buy Apples II

For each start shop, add the cheapest empty trip out and the cheapest loaded trip back to a purchase shop, then keep the lowest total.

Open the interactive visualisation