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.
Thank you for taking the time to reply!
basically as written, built in function array_sum will be used on call of sum function. You can find documentation of array_sum and you'll see that it waits for array parameter
Im new here so bare with me but how on earth does this work??
Nice
Lovely code
This comment is hidden because it contains spoiler information about the solution
Forgot about a booby trap - dividing null))) With the "for"-loop everything is ok!
make sure you check that n!=0, otherwise you will have an endless loop that would cause the timeout. otherwise, idk either
I wrote same code, but for some reason server timed out, IDK
OMG!Wasted so much time and didn't even think about it! Very clever 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
you don't have to check every time n !== 0 case. if before everything else,if you check !n case and return, you would reduce execution time and redundancy.Also it's not good practice to mutate input.
very clever
i, uh... nevermind
Loading more items...