OpenGenus/cosmos

Add box stacking solution in any language

Open

#1,895 创建于 2017年10月18日

在 GitHub 查看
 (5 评论) (2 反应) (0 负责人)C++ (3,724 fork)batch import
Hacktoberfestadd codenew algorithm

仓库指标

Star
 (13,462 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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.

贡献者指南