← ALL NOTES
Array

2561. Rearranging Fruits

Two equal-size fruit baskets basket1 and basket2. One operation swaps basket1[i] and basket2[j], costing min(basket1[i], basket2[j]). Find the minimum total cost to make the baskets equal as…

Loading…