Search
⌘K
Leetcode 3477. Fruits Into Baskets II
Given arrays fruits and baskets of equal length, simulate placing each fruit type in order into the leftmost unused basket with capacity >= the fruit quantity (each basket holds at most one type) and return how many fruit types cannot be placed. The core challenge is a left-to-right greedy "first-fit" matching that counts unmatched items.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.