Bin Packing Visualizer
Pack fractional items into unit-capacity bins while using as few bins as possible. Compare online rules, which must place each item as it arrives, with offline First Fit Decreasing and Next Fit Decreasing, which sort the full input from largest to smallest first.
Step places one item. Reset restarts the selected item sequence; changing a preset or rule starts a fresh run.
Items placed: 0 / 10
Bins used: 0
Capacity used: 0%
Lower bound: 5
Incoming items · each item has size greater than 0 and at most 1
Bins · capacity 1.00 each
EmptyFilled to capacity
Placement decision
Choose Step to place the next item according to the selected rule.
Item blockGreen outline = selected bin · Blue bar = capacity used
Bin summary
| Bin | Items | Load | Remaining |
|---|
The lower bound is ⌈sum of item sizes ÷ 1.00⌉. Online rules preserve arrival order; offline variants sort largest to smallest before packing.
First Fit scans bins from left to right and uses the first one with enough room.