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.
in older javascript versions,
Array.prototype.sort()
was not guaranteed to be stable.false == 0 consider it.
"Zero elements are defined by either 0 or "0". Some tests may include elements that are not number literals."
Please read this paragraph and make sure that you are reading logs correctly. The input you presented should indeed return
true
, and it's possible the eror you get is related to some other test case (next one or previous one).Didn't you read the description where it is explained?
[5,5] is correct for that input. As per the instructions, [5,5] is the earliest full sequence (starting from the left).
The 7 at the end of [3,7] is all the way at the end of the list, so it is 'later' than [5,5]
There is already a hint at the end.
No u cant unfortunately but u can resubmit another solution of yours~~
There is an issue below about exactly this. It's a matter of time until it gets fixed.
Here very good description of the prime number search algorithm:
https://www.w3resource.com/javascript-exercises/javascript-function-exercise-8.php
Ah, then yes, it would be good if you came up with a formula which does not use factorial :)
Indeed I do think that it's not that difficult, but yeah, it's easy to say if I already know the solution.
Good luck though, and when stuck, just do some more research for other ideas, or come back with questions.
Uh, and why would you even use factorial? :D
You can see them: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution#how-can-i-see-which-input-causes-my-solution-to-fail
Just checked, Python version is fine.
Because the result of the recursive calls is thrown away.