Skip to content

brendonbribeiro/PileBox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 

About

A challenge for the brave

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published