You are given two integer arrays capacity and rocks, each of length n, along with an integer additionalRocks.
For each bag i, capacity[i] represents its total rock capacity, and rocks[i] represents the quantity of rocks currently inside it. You have additionalRocks more rocks that you can distribute among any of the bags.
Return the maximum count of bags that can reach full capacity after placing the additional rocks.
Constraints:
n capacity.length rocks.length
n
capacity[i]
rocks[i] capacity[i]
additionalRocks
You are given two integer arrays capacity and rocks, each of length n, along with an integer additionalRocks.
For each bag i, capacity[i] represents its total rock capacity, and rocks[i] represents the quantity of rocks currently inside it. You have additionalRocks more rocks that you can distribute among any of the bags.
Return the maximum count of bags that can reach full capacity after placing the additional rocks.
Constraints:
n capacity.length rocks.length
n
capacity[i]
rocks[i] capacity[i]
additionalRocks