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.
Very nice kata of the series, congratulations.
the problem was in my code, I fixed it and everything went smooth, thank you for the help
For JS I think there's 500 random tests. With basic approach I'm passing in ~1.5s. You can always add console.log(n) at top of your function.
Im able to pass only 80 test maximum, i think the rest of the 20 tests has big numbers which will take more than 12 seconds to show in output
Either you got an infinite loop, or your code is really slow. Whatever the case, that's not a kata issue.
This comment is hidden because it contains spoiler information about the solution
I optimized my code to use only 1 loop, but i still get the same error
One last error i get is
STDERR
Execution Timed Out (12000 ms)
Why did my code time out?
Our servers are configured to only allow a certain amount of time for your code to execute. In rare cases the server may be taking on too much work and simply wasn't able to run your code efficiently enough. Most of the time though this issue is caused by inefficient algorithms. If you see this error multiple times you should try to optimize your code further.
Sorry I didn't pay attention to this, thank you for the explanation.
String
is not anArray
in JavaScript, they're entirely different datatypes.This comment is hidden because it contains spoiler information about the solution
You've to return an array, and you're not doing that.
output is giving TypeError: victimSeries.every is not a function
at Context.it (test.js:37:28)
there are accuracy issues.
in 6 test i have
8.077637632156219e+307
but assert requires
8.077637632156222e+307
Loading more items...