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.
This comment is hidden because it contains spoiler information about the solution
Not a question, and please don't post solutions in discourse liek that.
This comment is hidden because it contains spoiler information about the solution
I think you might want to go back to Bio 101 ;)
Oh, I thought it was by C#. Thanks @Chrono79.
public static int[] reverse(int n){
That's the initial function's name, he didn't copy the Class part, but as I see it, there is no problem with the function's name. That's java.
I have tried your code, @Zetawarden. To pass the tests, I had to do 2 things.
The first one was to correct function name. The second one was what @Chrono79 has already written. Hope you can solve the kata by the hints.
I don't understand why you wrote it either, return the other array, the one that contains the numbers.
Change this line
return new int[j];
You're creating b and then returning a new array?
See the sample tests:
Are you sure any humanYears greater than 2 should return the same amount of catYears and dogYears?
This comment is hidden because it contains spoiler information about the 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
The assertion error is because the returned value is not the expected one.
That's because of where you're returning sum (as I've already said ;) ).
Loading more items...