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
Your debugging is incorrect, and what you print is not what your function receives as input. Add this line as the first line of your solution to see actual input:
System.out.println(stops.stream().map(Arrays::toString).collect(Collectors.joining(",")));
It's pure Java.
In what language?
What I didn't understood?
One test result says:
{12=0, 9=3, 8=1, 10=9}
expected:<19> but was:<26>
AFI understood:
1 -> 12 get in, 0 get out : 12 in
2 -> 9 get in, 3 get out : 12 + 9 -3 = 18 inside
3 -> 8 get in, 1 get out : 18 + 8 - 1 = 25 inside
4 -> 10 get in, 9 get out: 25 + 10 -9 = 26 inside
Why it must be 19?