Ad
  • Custom User Avatar
  • Default User Avatar

    Nice kata for a train fan. In JAVA version, there is an issue with the second example test case. The routine public void testABD tests ABC in stead of ABD and accepts 0 as an answer.

  • Custom User Avatar

    Hmm, that is a good point. I hadn't thought about it from the point of view of trying to pass the tests just by memorizing the order of answers. Will address that next…

  • Custom User Avatar

    The tests are random but the answers aren't .. :D

  • Custom User Avatar

    Added random tests for JavaScript.

  • Custom User Avatar

    Added random tests for Java.

  • Custom User Avatar

    Yep, what I called local would be the example test cases. Thanks for fixing that!

  • Custom User Avatar

    Thanks for pointing that out. I will work on some random tests. Are "local tests" the example ones the user gets given when they train on that kata? I've just added some of those for JS. Truth be told I didn't intend to write a JS translation, but I couldn't convince codewars to remove JS from the list so I did what I could. I forgot to paste into the Example Test section.

  • Custom User Avatar

    No local test cases. No random test cases.

  • Custom User Avatar

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

  • Custom User Avatar

    Nice mathematical kata. Thanks for creating this.

    I have no idea what the difference was between my various submissions where only two of them allowed me to SUBMIT FINAL. It was nothing to do with the time taken, since I finally submitted on a run that took 117ms, but I could not submit the final solution on an earlier run that took 80ms. All of these runs showed all tests passing.