Available question text
Assign each fruit, left-to-right, to the leftmost unused basket whose capacity is at least the fruit's quantity (each basket holds one fruit type); return how many fruits remain unplaced. This is a greedy first-fit matching problem that for large n requires a data structure (e.g., segment tree/ordered set) to quickly find the first qualifying available basket.
Related questions
Continue with questions that share topics or the same question type.
- Fruits Into Baskets II
Coding
- Fruit Into Baskets
Coding · Array · Hash Table · Sliding Window
- Alternating Groups III
Coding
- Apple Redistribution into Boxes
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 3479. Fruits Into Baskets III
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source