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 had many problems with tests timing out.
Now that I have solved the kata (in Java) I can see the test code.
It is the algorithm used there for factorization (every number is between 2 and n is tested for being a factor) which is most time consuming, my solution is more efficient.
It's ugly when tests fail only because of inefficient test code. Test should be changed to be less frustrating.
EDIT: Just inspected the tests in JavaScript. There only primes below 1000 occur and are provided hard coded in an array. That makes execution very much faster.
In Java there is no limit, plus the factorization in the test is extremely time consuming.