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.
This comment is hidden because it contains spoiler information about the solution
I think it is just O(n)?? If I can assume that the functions always do simple additions and multiplications meaning they are O(1), then the function chainer will execute n of these.
So it should just be O(n), regardless of the recursive nature of this kata.
Watch out for the arguments. The
count
argument could be way beyond the length of the array, it could even reachInfinity
.Ranks cant be changeed
I am agree with gxcad. You need to think how to solve it with simple way
Not sure how it could pass on CW if it was 40s on your machine, but feel free to suggest improvements :)
Can you give a test and a supposedly "wrong" solution that doesn't pass your test?
Please which?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
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.