Ad
  • Custom User Avatar

    It is not. The randomly generated [String] is processed before being fed to your solution. Yes, the failure message could have been better ( and it is now ).

    Please state your language next time.

  • Custom User Avatar

    The kata asks (and in fact it is even stated in the title) for the next bigger number with the same digits.

    It does not ask for "a biger numer whit exacly same digits".

    With input digits 2017:

    • the biggest number with same digits is 7210

    • 7012 is also bigger than 2017, and has exactly same digits, but it is not the next bigger.

    • Finally the next bigger number "after" 2017 is 2071. This is what the kata wants you to find.

  • Custom User Avatar

    the kata ask a biger numer whit exacly same digits, and 2017 is the input and for output expect:2071 but 7012 is biger than 2017 and have the same digit but you got error

  • Custom User Avatar

    I am going to close this issue as a user error. If you are really, really sure your code is correct, plese post here:

    • your code (formatted and marked as spoiler),
    • input of failing tests,
    • failure message, and/or value returned by your code and value expected by tests.

    You can also come to #help-solve channel of Codewars Discord, someone will definitely help there.

  • Custom User Avatar

    Your solution seems to return invalid, too small values:

    Testing for 4440220
       It should work for random inputs too: expected 4440022 to equal 4442002
    

    expected 1234567089 to equal 1234567908 - my code produce correct: 1234567098

    This does not seem to be the case. After adding logs to your solution, I can see:

    Input:1234567890
    Your result: 1234567089
       expected 1234567089 to equal 1234567908
    

    Your code does not produce 1234567098.

  • Custom User Avatar

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

  • Custom User Avatar

    The kata does not ask about the biggest.

  • Custom User Avatar

    2017 can be 7210.. 2071 is not the biggest
    or
    Expected 123456798 but got 987654321
    how woud a number starting with 1 be smaller, when it contains 9 ?!

  • Custom User Avatar

    Expected: equal to "theStealthWarrior"
    Actual: "theStealthWarrior

    I have no idea how to fix this problem or where to even start.

  • Custom User Avatar

    Everything passes except for the randon input, which is [String] instead of String?