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.
The trick isn't to actually calculate the factorial
I'm assuming you know what a prime number and a factorial is. They want you take a number (n) and return its prime factors. So the prime factors of 6! are the 2222 * 3 * 3 * 5. Prime factors of 10 are 52.
As others have noted, the name of this kata is something of a misnomer if its solution allows for both negative and float values. You really should have added test cases for both float and negative. Yes, there is chance entire array will be negative, but you can always told user to handle this case by returning null.
This comment is hidden because it contains spoiler information about the solution