[Solved] Apple Redistribution into Boxes leetcode C++,JAVA, Python
![[Solved] Apple Redistribution into Boxes leetcode C++,JAVA, Python Apple Redistribution](https://realcoder.techss24.com/wp-content/uploads/2024/03/output-12-768x512.png)
You are given an array apple of size n and an array capacity of size m. There are n packs where the ith pack contains apple[i] apples. There are m boxes as well, and the ith box has a capacity of capacity[i] apples. Return the minimum number of boxes you need to select to redistribute these n packs of apples into boxes. Note that, apples…