Ad
  • Custom User Avatar

    That's not how you count a gap, when there is a prime number it's over. You can't choose to ignore it.

    101-103 2-gap
    103-107 4-gap
    104-109 2-gap
    
  • Custom User Avatar

    And what about (101, 109)? We have 102, 104, 105, 106 and 108 between them which means a 6-gap. Why the right answer is None?

  • Custom User Avatar

    No problem, I don't know why I checked Python (I jump from language to language to solve some issues sometimes), good to know the number of tests is the same (that's not always the case).

  • Custom User Avatar

    Nevermind, there are also 510 tests in JavaScript. Optimized my solution for speed and saw it.

    Thanks Diego! :)

  • Custom User Avatar

    Okay. I'm using JavaScript though, do you know how many there are for it?

  • Custom User Avatar

    I think in Python they're 510.

  • Custom User Avatar

    How many tests are there in this challenge?

    I have 183 tests passing (varies for each run), none failing but, timing out. Would like to know how close I am; anyone know?

  • Custom User Avatar

    Freaking kidding me mahn! Darn! Thanks anyway, got it.

  • Custom User Avatar

    This isn't a kata issue, you misunderstood what to do, it's even explained in the instructions:

    gap(6,100,110) --> nil or {0, 0} : between 100 and 110 we have 101, 103, 107, 109 but 101-107 is not a 6-gap because there is 103 in between and 103-109 is not a 6-gap because there is 107 in between.

  • Custom User Avatar

    Lots of the tests in the JavaScript version are wrong, even in simple tests.

    Console log output is in format: m, n, g - error message

    100, 110, 6 - Expected: 'null', instead got: '[101, 107]'

    300, 400, 10 - Expected: '[337, 347]', instead got: '[307, 317]'

    30000, 100000, 8 - Expected: '[30161, 30169]', instead got: '[30089, 30097]'

    Two basic tests and as many as 15 more in the advanced tests have this issue.

  • Custom User Avatar