Ad
  • Default User Avatar

    Thanks! This is indeed a lot shorter and easier :)

  • Default User Avatar

    This was definitely the most challenging Kata I have solved so far, but also among the most enjoyable ones.
    I requires a lot of logical thinking, spatial reasoning and problem solving capacity, as well as sufficient programming skills to implement the problem solving procedure.
    It took me a few days to come up with a good strategy, and a few more to implement it.
    At some point, I was able to find correct solutions for all cases, but kept getting a timeout due to poor performance. It was only after I came up with better lower bounds for the remaining distance that I managed to solve all test cases in time.

  • Default User Avatar

    I'm using C++, and the test is failing when a finite value is expected. For the Randomly_Placed_Seeds test, I'm getting the following error message : Wrong value for cell 2 (19.3523896053, expected 19.3523909783). The Hexagonal_Grid test is failing as well, giving a similar message : Wrong value for cell 6 (3.4641015, expected 3.46410161514)
    It seems to me that I'm following a correct reasoning, and that these errors are caused by rounding differences. I'm not sure if this is something I can solve by using a better or more efficient implementation, but I'd be glad to hear if you have any ideas. If not, you might consider setting your acceptance criteria to some percentage of the expected result, instead of an arbitrary value.
    Even though I'm still having some issues, I would like to thank you for writing this Kata. I spent some time thinking about the most efficient way to solve this problem, and I enjoyed the challenge.

  • Default User Avatar

    I liked this Kata a lot, but I did not manage to submit a working solution because of rounding differences. I would suggest to accept solutions which are close enough to your original solution, because different approaches could lead to (slightly) different solutions. Completing this Kata will be more fun without having to struggle with rounding.