Ad
  • Custom User Avatar
  • Default User Avatar

    Anyone who has solved the kata can see your code if you post in discourse. This kata is almost 8 years old and has over 64k solves in javascript. The chance that someone will find a bug in the kata at this point is extremely small (but not impossible, I guess). In this case, it's pretty simple to look at the test cases and see what the test actually expects your function to return.

  • Custom User Avatar

    No, it's the other way around, and you can convert one into the other, why do you say you can't?

  • Default User Avatar

    there are problems with test#4 and test#5
    2110 cannot be converted into 1021
    and 987654321 into 123495678

    @Test
    public void test_04() {
        assertEquals(2110, DescendingOrder.sortDesc(1021));
    }
    
    @Test
    public void test_05() {
        assertEquals(987654321, DescendingOrder.sortDesc(123495678));
    }
    
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution