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.
Depends on the langugae you're training on
I guess because it's more comprehensive and declarative.
Did you post your comment on the wrong solution by accident? This solution is fine, one of the others has the problem you described.
Thank you for your comment. I think you're right, so i refactored my 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
One must be carefull with this method, because when you pass "int[] array", you pass a reference to the array. So, after the completion of the method the source array is also inverted.
else is not necessary here, i++ is enough)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
And what about ArrayIndexOutOfBoundsException?)
But you don't provide a check for not valid input in this code, so that's really not good practice)