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.
I'm gonna list only the skip steps, in the middle fill them with a step of 1:
15350, 15355, 15365, 15375, 15385, 15395, 15500.
The change is, instead of going from 3 to 4, it changes from 3 to 5, but only when it should be 4. You're thinking it should change 3 for 5.
No, you got it wrong, instead of changing from 3 to 4, it changes from 3 to 5. It means when you see 15350 after 15339 in reality you only travelled 1 mile.
Care to explain how do you think that'll be the case? From 15229, it'll go to 15230, 31, 32, 33, 35 (skipped a 4 here), 36, 37, 38, 39 and 15250.
Have you solved it?I've met the same problem.
The CodeWars framework internally uses
call
so if your implementation isn't correct, nothing will work.Note that even if you haven't used
console.log
, all of the tests log something. It's internally using the same framework.The kata description contains a message saying that
console.log
internally usesFunction.prototype.call
, so it looks likelog
may have been disabled for this kata.You are right!
The tests doesn't include this variants: my function don't work properly if the second version has more subversion parts than first.
hi, I test with my solution it works for the case mentioned by Anton, but still fails with real test cases. Could you give a hint what could be the difference between the case above and real test case?
Something like that:
The idea, that handlers list can be changed during emit, but this handlers should not be called during current emit process, but should be called during next emit process.