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 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.
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
This comment is hidden because it contains spoiler information about the solution
It wasn't difficult. Trouble with the input data, but otherwise, it's simple.
Misleading example. Example is array of arrays, but the tests are done with array of objects.
Yes, it is explained at the bottom, but still unnecessarily misleading. I think it would better if these were consistent - i.e. the example should show objects, or the tests should test an array of arrays as the argument.
Edit: I should add my comment is for the Javascript variation.
Watch out for the arguments. The
count
argument could be way beyond the length of the array, it could even reachInfinity
.Well done! Everybody has to start somewhere!
Ranks cant be changeed
I am agree with gxcad. You need to think how to solve it with simple way
WHHHAAAT
Not sure how it could pass on CW if it was 40s on your machine, but feel free to suggest improvements :)
GREAT Kata. Love the ones that are very easy to understand what it is asking for, yet challenging to code and logic.
That said, I'm pretty disappointed to find out a 4kyu rated kata allows brute force solutions to pass. On my system, the difference between my solution and another accepted solution for the number 19,999,999 was 38.4 seconds vs 0.11 seconds.
Writing a efficient algorithm for this does feel worthy of 4kyu rating though, and you get more out of it. Thumbs way up.
Loading more items...