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.
This comment is hidden because it contains spoiler information about the solution
6 votes for Best Practices..I am speechless...
There are 100 random tests...
I passed 10-13 random tests and then it times out, so it seems there are several random tests. One of the posts below says there are around 25 random tests, could be more. My code takes average 500ms to pass one random test, I believe I will have to pass each random test in less than 100ms to complete all tests.
Very dedicated coder. I would hire you ;-))
Great kata! Finally I managed to pass all tests. The kata requires a lot of circle geometry, tangent lines, circle intersections etc.
geoffp has been writing great katas. Last week I solved a kata, written by him, on Optical Character Recognition, which was challenging and fun. I have been working on this kata for a couple of days now and still hasn't come across any strategy to solve it. Let's see how it goes...
Good use of simple maths. Though, it is not considered a best practice to write a long unreadable code. ?: operators are considered less readable then if..else statements.
The solution can cause stackoverflow with large numbers.
This comment is hidden because it contains spoiler information about the solution
I think if you have only two eggs and m tries, the answer would always be (m/2)*(m+1). The pattern would be 14, (14+13), (14 + 13 + 12)...I don't know how the pattern changes if you have more than 2 eggs; that's very tricky!!
Very good kata. Thanks to the kata writers for their hardwork.
I would declare 'sum' and 'i' as 'unsigned' because a large positive value of 'start' and 'end' would generate error in this code.
I agree with the following comment. I just finished this kata in C and the memory allocation and clearing was not streight-forward. I believe, especially for C, this kata should be level 5.
I love this kata too. It took me a week of thinking and observation to find the underlying pattern. If you generate XOR matrix from zero indexed rows and columns, you will be able to see they follow a unique (but very complex) pattern. Once you identify the pattern, then it is a matter of writing recursive or similar functions. Brute force attack will definitely not work. I have solved it with simple maths as I am not much familiar with bitwise arithmetic.
Loading more items...