Solving the Box Selection Algorithm

When I joined Shotput in February, I knew I was going to get to dive deep into development. It’s a small team with some tough problems to solve, and I was really excited to flex my newly acquired programming skills and simultaneously continue to develop as a software engineer. What I hadn’t yet realized was that I would get the opportunity to take on a non-trivial algorithmic problem and solve it: box packing.

Think about it for a second. At first it seems like there is a simple solution to the problem: see if a product fits, if it does, put it in the box, if not, use a different box. But then you realize you have to think about dimensions, rotations, packing more than one item at a time, and shipping costs. With so many variables, runtime exponentially increases which means you have to apply smart optimizations. In other words, it reduces to a well-known computer science problem called Knapsack.

Click Here

Tags: box Selection