Ad
  • Default User Avatar

    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

  • Custom User Avatar

    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.

  • Custom User Avatar
  • Default User Avatar

    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.

  • Default User Avatar

    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.

  • Default User Avatar

    I just tried a bad answer. Normally you have (and I had) something like that ✘ expected:<328> but was:<228> for example.

  • Default User Avatar

    That would lead to [612235,0,2] instead, you can only move one digit.

  • Default User Avatar

    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.

  • Custom User Avatar

    In the Java testcases, the expected and the actual are swapped around, so your solution is returning 15 and the expected answer is 6.