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.
Op solved it closing ~~
n%n
is always 0 ;-)Does it work now?
Check for null before...
As first call in the method.
numbers.length
can be zero, so you can't create an array likenew double[numbers.length-1]
becausenumbers.length-1
may be negative.What is the text of the error?
And please paste your code here (mark as spoiler!).
What language?
Do you check for null?