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.
make sure you put
i < length
instead ofi <= length
@NikosEfthias: Not an issue if you can't produce reasoning for the issue.
@Valentin_Zuarez: you have solved the kata, in any case what you were probably trying to do is fixed.
https://en.wikipedia.org/wiki/Naming_convention_(programming)
Wtf, this should be in the description :/
Sorry for the inconvenience... The signature should have been:
bouncing_ball
instead ofbouncingBall
.Other guys passed the kata, silently modifying the name of the function.
Thanks!
one or the other is used depending on the language
I don't think hiding an error by returning an effectively random (words of length 0 don't exist) value is better than reporting an error, it will just result in an error somewhere else.
It's not even an optimization, it's the only logical choice.
It will panic. However, the kata says
String will never be empty
, so it's a safe optimization.same, it seems to be something related to the random test, because my program can pass the sample perfectly