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.
Neither for [5, 2, 4, 1, 3]
This solution doesn't work for [4, 2, 3, 3, 1, 2, 2, 0].
This solution fails for [1, 0, 0, 1, -1, 0, -1]. The result should be 4, the function returns 3.
Did you mean "to make it more elegant" maybe? Also I think this example in the description:
factorial(3)/321 = 6
is missing a*
sign, plus you could use better formatting, like starting each sentence with a capital letter.Otherwise good job.
The description could be improved.