1D bin packing solution with C#.