← Questions

Place items into the earliest bin that fits

0
AmazonCodingLast asked Aug 2025

Bins have capacities and items arrive in order. Put each item into the first bin, from left to right, that still has room for it. Return where each item goes. Do better than scanning every bin per item.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding