Ad
  • Custom User Avatar

    Such minor details do not really affect the algorithm used to solve the kata. So not using 0, or similar restrictions, do not make your kata not a duplicate.

  • Custom User Avatar

    Just noticed, that in your Kata digits can be in the number multiple times. Also, there are a few differences between your and my Kata.
    But I will leave it unpublished for now.

  • Custom User Avatar
  • Custom User Avatar

    Sorry 'bout that. Maybe you could translate that to Dart? You might have to forfeit an existing language, but I think you can translate it when you've done that.

  • Custom User Avatar

    Thanks! I will close it.

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    All the tests can be easily hardcoded.

  • Custom User Avatar

    That is true. You could simply hard-code the outputs. But that is not the point of this kata.
    If you want to cheat, you could simply do that, but then you are simply fooling yourself, aren't you?

    n could theoretically be 36, but that would simply need too much time to calculate.

  • Custom User Avatar

    How high can n be? The outputs can be hardcoded easily for 2 <= n <= 36 (and even higher if one's willing to waste their time) - if that is the case, you should unpublish the kata, tbh.

  • Custom User Avatar

    So I think you are incorrect in how you are generating the numbers.

    Given y = (x * 2 +1 ), you aren't looking to plug n in there, as x is what is in u.

    This sentence might help clear up the issue "1 gives 3 and 4, then 3 gives 7 and 10, 4 gives 9 and 13, then 7 gives 15 and 22 and so on..."

    So you start with 1, y will equal 1 * 2 + 1 = 3, z =4. So now it looks like [1,3,4] The next step is moving to the next item in the sequence. So you do the same y = 3 * 2 + 1 = 7 and z = 10 and so on.
    So you aren't plugging into the y or z formula but are using the numbers in the sequence.

  • Default User Avatar

    Timing out is not a kata issue. Your code is too slow.

  • Custom User Avatar

    Dart Completions 13

    Not so many, but it seems some people passed the random tests in Dart too. And yes, all test should pass in less than 12 seconds.

  • Custom User Avatar

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