Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    6 votes for Best Practices..I am speechless...

  • Default User Avatar

    There are 100 random tests...

  • Default User Avatar

    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.

  • Default User Avatar

    Very dedicated coder. I would hire you ;-))

  • Default User Avatar

    Great kata! Finally I managed to pass all tests. The kata requires a lot of circle geometry, tangent lines, circle intersections etc.

  • Default User Avatar

    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...

  • Default User Avatar

    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.

  • Default User Avatar

    The solution can cause stackoverflow with large numbers.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    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!!

  • Default User Avatar

    Very good kata. Thanks to the kata writers for their hardwork.

  • Default User Avatar

    I would declare 'sum' and 'i' as 'unsigned' because a large positive value of 'start' and 'end' would generate error in this code.

  • Default User Avatar

    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.

  • Default User Avatar

    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...