Pregunta de entrevista de Conviva

Box stacking problem. The classic dynamic programming problem.