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.
Thanks, my english is not very good)).
These are the pairs for that input:
(21, 20), (22, 40), (39, -56), (30, -55), (95, 94)
Only two of those have consecutive numbers:
(21, 20), (95, 94)
assertEquals(2,Solution.solve(new int[]{21, 20, 22, 40, 39, -56, 30, -55, 95, 94}));//
There is only one pair (22, 40) or am I wrong? Because of this, the solution does not pass.