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.
the solution has: Time π(πloglog(π)+π(π/logβ‘π)), Space π(π)
where π is max value from a given array
the illegal values! xD
thats what i mean, my solution was way too long compared to this beauty
why. Its good
I'm kicking myself because of this code
neat, but not a best practice at all, which thankfully the votes have reflected haha
I'm genuenly confused why this comment would make people upset, but whatever.
This kata wants you to calculate the perimeter, not the area. You can look up on google what is perimeter of 2d shapes. So, the test is correct, it's 12.
The answer in the test is 12. But the 3rd figure has an area of 6, in total all the figures are 10. Dear developers, please count with your finger in the drawing and correct the test or conditions.
This comment is hidden because it contains spoiler information about the solution
Where is the image?
People who are downvoting this comment are insulting themselves..
This is literally 3rd grade math..
nice work!!
really?
python fork to address the below issue.
The figure each represents cases when
n = 1, 2 and 3
respectively. So, it is basically like a right-angled triangle composed of cuboids and continues to expand1 units
horizontally and vertically asn
increases. Whereasa
represents the size or length of one side of the cuboid. Your task is to find the perimeter of the composed shape, so from left to right of figure their perimeter is4, 8, 12
(assuminga
is1
)Loading more items...