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.
As mentioned before (4 years ago), if you have the problem with random testcase, don't change input array, create a new one. JAVA.
Agree, only for this case special format output....
In description stays number of towns is 3, but in tests everything is possible. Why?
Another people decided so. Nothing especial.
base String = "012345"
Odd indexes = 135
Even indexes = 024
new String = "135024" - After 1 run.
Odd indexes = 304
Even indexes = 152
new String= "304152" - After 2 run.
Odd indexes = 012
Even indexes = 345
new String = "012345" - After 3 run
And so on....
It means that this String hasn't consecutive repetited character, and correct answer will be the first character in the String.[j, 1]