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.
check this
Note that egor7orlov didn't write good solution, but best so far. You're both right. Yes, absolutely this is a bad solution, but relatively, since it seems almost everyone iterates up to
n
, it's the best :pWell, it's good if you ignore the fact that it has terrible performance characteristics ;)
"expected 10 to equal 1" means your function returned 10 instead of 1, not that the input was 10.