Ad
  • Custom User Avatar

    I have the same issue, dont know why it is happening

  • Custom User Avatar

    Input is coordinates of all points. You just have to calculate two points which have max distance between them. you have to output the max distance you get.

  • Default User Avatar

    I don't understand this Kata, who can explain me please?

  • Default User Avatar

    The problem was that in the examle code you used farthestDistance, but the tests expected furthestDistance instead. This is misleading a bit.

  • Custom User Avatar

    You're right. Is it worth correcting in tests because if I do it then invalidates all previous answers (some really clever ones) ?

  • Default User Avatar

    I think it has been not corrected in the tests.

  • Custom User Avatar

    Thank you. Corrected!

  • Default User Avatar

    Great Kata! Grammar and spelling Nazi that I am, though, it should be "Farthest Distance" not "Furthest Distance" since we are referring to literal (mathematical), not figurative distance.

  • Default User Avatar

    Eg. https://www.codewars.com/kata/simple-fun-number-22-is-smooth/cpp

    I'll wait a couple days before plugging the hole and notifying the author. ;-)

  • Custom User Avatar

    Absence of evidence is not evidence of absence.

    Have you tried to create tests where the reference solution would be accessible?

  • Custom User Avatar

    Idk what you're talking about. I've tried accessing the reference solution on purpose a few times in C++ but it said "bla-bla-bla is not declared" each time.

  • Default User Avatar

    @FArekkusu, @JohanWiltink, whoops! I misread who responded. Sorry, Johan. :-)

  • Default User Avatar

    @JohanWiltink, I beg to differ. If a function is not declared static, then it is accessible from any module within that application. To hide it within the test module it must be declared static, localized within a function as a lambda, or declared as a method within a class/struct. If you include it within the Describe block then it's a method, but if you define it outside that block sans static then it's accessible from the user's code. I've been able to call the reference solution in a number of C/C++/NASM katas because of this loophole. I won't give details here, but it is something to keep in mind when you're writing katas and translations.

  • Custom User Avatar

    The functions in C++ are inaccessible as well.

  • Default User Avatar

    @JohanWiltink, thanks. I didn't know that the JS test code is inaccessible to the user. That's not the case in C/C++ or NASM. In those languages you do have to make your 'reference solution' private, static, or localized.

  • Loading more items...