Skip to content

Latest commit

 

History

History
52 lines (31 loc) · 1.08 KB

README_EN.md

File metadata and controls

52 lines (31 loc) · 1.08 KB

中文文档

Description

You have a stack of n boxes, with widths wi, heights hi, and depths di. The boxes cannot be rotated and can only be stacked on top of one another if each box in the stack is strictly larger than the box above it in width, height, and depth. Implement a method to compute the height of the tallest possible stack. The height of a stack is the sum of the heights of each box.

The input use [wi, di, hi] to represents each box.

Example1:

Input: box = [[1, 1, 1], [2, 2, 2], [3, 3, 3]]

Output: 6

Example2:

Input: box = [[1, 1, 1], [2, 3, 4], [2, 6, 7], [3, 4, 5]]

Output: 10

Note:

  1. box.length <= 3000

Solutions

Python3

Java

...