Available question text
Given capacities, current rocks, and a budget of additional rocks, maximize the number of bags that reach full capacity by computing each bag's deficit and greedily filling the smallest deficits first until you run out of rocks.
Related questions
Continue with questions that share topics or the same question type.
- Maximum Coins From K Consecutive Bags
Coding · Array · Binary Search · Greedy
- Maximum Sum with Capacity Constraints
Coding
- Maximum Weight in Two Bags
Coding
- Task Assignment to Machines by Maximum Capacity
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2279. Maximum Bags With Full Capacity of Rocks
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source