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.
In other words, what hobovsky is saying is that you need to make a copy of input array.
It's a test against mutation of input. It does not matter what the input is, your solution fails it because it probably modifies the input array.
How many times do each of those numbers that 2 is a factor of occur?
The case 5,0 was only an example...
a = [15, 30, -45]
2 is a factor of 30 the sum of numbers divisible by 2 is 30 hence a partial result [2, 30]
3 is a factor of 15, 30, -45 the sum of numbers divisible by 3 is 0 hence a partial result [3, 0]
5 is a factor of 15, 30, -45 the sum of numbers divisible by 5 is 0 hence a partial result [5, 0]
So the final result is: [[2, 30], [3, 0], [5, 0]]