OpenGenus/cosmos

Add box stacking solution in any language

Open

#1 895 ouverte le 18 oct. 2017

Voir sur GitHub
 (5 commentaires) (2 réactions) (0 assignés)C++ (3 724 forks)batch import
Hacktoberfestadd codenew algorithm

Métriques du dépôt

Stars
 (13 462 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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.

Guide contributeur