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 initially tried to nest too many array methods and failed the time test. Separating and keeping them simple helped.
Challenges with time/performance are good way to practice thinking about alternatives.
All tests worked until your code timed out, it's not fast enough. Try another way.
All tests are working but getting timeout exception for arrays of length 15000 and above.
Looks like there is an extra space before the E
Most probably it's because of the complexity of the algorithm. Try to find a solution which needs less time to do the calculation! ;)
I have my Tests Passing with
but I am getting this Error when Running my attempt:
use BigInteger to store your resultant
All tests before it times out isn't the same as all tests. Improve your algorithm.
same timeout issue for me too.
Negative numbers below 0 are not considered prime generally.
So it is obvious that it should return false.
Server timeout error. Even all tests passed.
Ok.. Yeah that will do.
Print the input.
This comment is hidden because it contains spoiler information about the solution
I eventually solved this, but would have appreciated seeing in the instructions that there is a 3-space separation between words but only a 2-space separation between numbers. It took me a long time to figure that out, I would have come to the solution much quicker if I'd known that when starting.
Loading more items...