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.
261235, "[126235, 2, 0] means move the digit which is on the index 2 to the index 0,not swap the digits on the index 2 and index 0.
261235, "[612235, 0, 2] is the right number not 126235
The logic of indexes order is weird. I believe it does exist since a lot of people solved it, but it is weird and poorly described.
WTF?
If there is a flaw in your code, at CW or with Eclipse you will get the same false result. I can only repeat that there is no error in the tests which are the same in all languages for the fixed ones.
I think you can see this test in "Example tests". In my previous post I only gave an example of what happens - normally - when a test fails.
I just tried a bad answer. Normally you have (and I had) something like that
✘ expected:<328> but was:<228>
for example.That would lead to [612235,0,2] instead, you can only move one digit.
908 guys passed the kata, the tests are the same in all languages and are correct.
BTW when you ask for an answer, post a question, not an issue.
In the Java testcases, the expected and the actual are swapped around, so your solution is returning 15 and the expected answer is 6.