Tests are invalid, generally I guess math solution is poorly implemented or description is lacking.
Example from description:
Layer 1 = X ;
Layer 2 = X | XX ;
Layer 3 = X | XX | XXX ;
Which obviously suggest 3 elements should return 2 - even example says that, but test is hardcoded for 3 elements there is just 1 completed layer, same story goes for 10 elements and 3 layers instead of 4.
EDIT: Okay, solved, but in my opinion, description just lacking in terms of visualizing 3d shape of tetrahedron, otherwise it's faulty/true example, depends how someone would read that, not anyone have to be native english and know what tetrahedron is, I believe that's the reason why visual example should be showed correctly.
EDIT2: Please give me 30 minutes I'll draw you 3d shape myself, and paste link in comment.
Scala translation
Solved then failed coz I answered in JS lol
https://imgur.com/1BskAXk
Image you can use.
Not an issue. A pyramid is not a triangle.
tetrahedron: triangle-based pyramid (it's already in the description)
No
Tests are invalid, generally I guess math solution is poorly implemented or description is lacking.
Example from description:
Layer 1 = X ;
Layer 2 = X | XX ;
Layer 3 = X | XX | XXX ;
Which obviously suggest 3 elements should return 2 - even example says that, but test is hardcoded for 3 elements there is just 1 completed layer, same story goes for 10 elements and 3 layers instead of 4.
EDIT: Okay, solved, but in my opinion, description just lacking in terms of visualizing 3d shape of tetrahedron, otherwise it's faulty/true example, depends how someone would read that, not anyone have to be native english and know what tetrahedron is, I believe that's the reason why visual example should be showed correctly.
EDIT2: Please give me 30 minutes I'll draw you 3d shape myself, and paste link in comment.
Thanks :)
.
COBOL translation.
.
A small suggestion: The phrase "cross-section" can be highlighted in the description.
This comment is hidden because it contains spoiler information about the solution
I'm sure it's a duplicate, but I can't remember the title of the other kata, I think it was one of myjinxin's.
The first layer has 1 cubes.
The second layer has 3 cubes.
Total needed for 2 layers: 4 cubes
Loading more items...