Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
It should be noted that in the detail, m > 2.
Thank you for your attention.I also had this issue.
¡Vale la pena tanto código!
Ya tenemos defindo el tipo BigInt gracias a ti! ;-)
Fails on: gap(3, 3, 4), gap(2, 2, 6), gap(4, 6, 11), gap(4, 7, 11).
This fails with gap(2, 2, 6), should be null and returns [0,2].
Also @lindaxiao-hust said also fails with gap(3, 3, 4) should be null and returns [0,3]
Fails on gap(4, 6, 11) and gap(4, 7, 11) returns null on both and should be [7,11].
@ivanK_rep, Can you please explain me how to create a test for this kata? I don't know to create the "node" to test (I'm new to JavaScript since 1996!). Thank you!
I don't know what "spoiler" means, sorry!
Now I know, sorry again!
Please use spoiler flag next time.
This comment is hidden because it contains spoiler information about the solution
Evidentemente desconocía Number.isInteger y mis matemáticas no son muy buenas ya que el bucle ese para encontrar el siguiente se reduce a:
Simple y claro, me ha ayudado a entender cómo funciona reduce (que desconocía)