input Set I of n positive rationals less than or equal to 1;
output Partition of I in subsets of unitary weight;
begin
Sort elements of I in non-increasing order;
(* Let (a[1],...,a[n]) be the obtained sequence *)
for i=1 to n do
if there is a bin that can contain a[i] then
insert a[i] into the first such bin
else
insert a[i] into a new bin;
return the partition
end.