OpenGenus/cosmos

Add box stacking solution in any language

Open

#1895 aperta il 18 ott 2017

Vedi su GitHub
 (5 commenti) (2 reazioni) (0 assegnatari)C++ (3724 fork)batch import
Hacktoberfestadd codenew algorithm

Metriche repository

Star
 (13.462 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

This is a(n):

  • New algorithm
  • Update to an existing algorithm
  • Error
  • Proposal to the Repository

Details:

Add the code for the box stacking problem in any language.

The code should be placed at code/dynamic_programming/box_stacking

For contribution guidelines, see this.

Problem statement:

Given a set of n types of 3D rectangular boxes, find the maximum height that can be reached stacking instances of these boxes.

Observations:
  • A box can be stacked on top of another box only if the dimensions of the 2D base of the lower box are each strictly larger than those of the 2D base of the higher box.
  • The boxes can be rotated so that any side functions as its base.
  • It is allowable to use multiple instances of the same type of box.

Guida contributor