Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Hi,
the first one, with 3rd piece 16 width x 3 high size.
And yes, if I choose the solutions with the "widthest pieces as much as possible in the begining", it passes..... maybe we should add this restriction to the instructions?
Thanks for the kata!!
In your example, which solution is recognized by tests as valid, and which as invalid?
I think (I cannot remember exactly tho) that if the first pieces are equal, need to pick the solution where the second piece is wider, and if the second pieces are also equal then the solution where the third piece is wider, etc. So in your example, pieces 1 and 2 are identical, but piece 3 is wider in solution 1, and narrower in solution 2, which means you should pick the solution 1.
Does this match your observation?
Hi,
sorry but there are cases with several solutions that are not properly recognized.
For example:
Testing for:
cake =
....................................
..............o.....................
......................o........o....
....................................
......o.............................
.........o..........................
.................................o..
....................................
There are two possible solutions verifying the requeriments:
111111111111111111111111222222222222
11111111111111o111111111222222222222
3333333333333333444444o42222222o2222
333333333333333344444444222222222222
333333o33333333344444444555555555555
666666666o66666644444444555555555555
666666666666666644444444555555555o55
666666666666666644444444555555555555
111111111111111111111111222222222222
11111111111111o111111111222222222222
3333333344444444444444o42222222o2222
333333334444444444444444222222222222
333333o34444444444444444555555555555
333333336o66666666666666555555555555
333333336666666666666666555555555o55
333333336666666666666666555555555555
The test says "Test Failed" because it's able only to identify one of both valid solutions.
Is there any other restriction for the valid solution missing?
Or maybe the tests should check if the first piece is as widthest as possible, if the size of all pieces are the same, the have a raisin and when you join in order you have the pie....not just expecting a fixed solution...
Thank you!!
Agreed.
It's not necessary to check (I+j)% == 0
This comment is hidden because it contains spoiler information about the solution