Rearranging Fruits
Rearranging Fruits gives two fruit-cost arrays and permits cross-basket swaps priced by the cheaper fruit; return the minimum cost to make their sorted contents identical, or -1 if impossible.
We'll cover the following...
We'll cover the following...
Statement
Given two 0-indexed integer arrays, basket1 and basket2, representing the cost of each fruit in the basket. Each ...