Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 1.02 KB

README.md

File metadata and controls

27 lines (16 loc) · 1.02 KB

Pile Box challenge

This challenge is a great way to test your knowledge, and an even better way to say hello to new languages

Demo: https://brendonbarreto.github.io/PileBox/

The challenge

The main goal is to calculate the height of a stack of boxes. Each box has a height and a width that will be informed. But it's not as simple as it sounds ...

The problem

alt tag

Test Case

To ensure that the application is calculating the height of the stack correctly, basically 3 tests are required. If you succeed in all, congratulations you won

The boxes should be added sequentially, and conform to the specified sizes.

[x, y] = A box with x of width and y of height

Test 1: [2, 2] -> [1, 1] -> [1, 2] -> [2, 1] = 4
Test 2: [5, 7] -> [3, 4] -> [1, 2] -> [2, 3] -> [4, 2] -> [4, 4] = 11
Test 3: [3, 1] -> [2, 2] -> [1, 3] -> [6, 9] -> [5, 8] -> [3, 7] -> [4, 2] -> [3, 1] -> [2, 2] -> [1, 4] = 14