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 enough. Either it's not as optimized as you think, or you have some bug.
BTW this kata does not need a direct primality check, maybe your approach is not the best one?
You're welcome. I've also edited my posts accordingly.
Yes, you are correct, I had misinterpreted the test results and misread that aspect of the instructions. Apologies if I waylaid anyone and thanks for catching it.
In case 109 is the test which his code is failing:
See this note, 67890 is incrementing, 67888 is upcoming incrementing, both tests are ok.
109 isn't decrementing, because of the other note:
it can't be decrementing by definition.
Edit - ok, i'm seeing it more clearly... it doesn't wrap around but it can end it zero .I'll edit my response
Edit - Without more information from OliverS-K we can't conclude 109 is the case his code is failing, but that's a possibility.
Edit -
My response here was incorrect as per the instructions. 109 should not be considered interesting because decrementing sequences shouldn't wrap around.
Print the input, check why your code is failing: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution#print-input
If it says upcoming, 2 is not the right answer.