You have n bags numbered from 0 to n - 1. The bag i can hold a maximum of capacity[i] rocks and currently contains rocks[i] rocks. There are additionalRocks number of additional rocks you can place in any of the bags. The task is to find the maximum number of bags that can reach full capacity after placing the additional rocks in some bags.
Click Run to execute sample tests.