Then you get the same result in your IDE and here, there is a problem with your code, because, you can see the next bigger number you can form with the digits of 144 is indeed 414.
// expected -1 <- Your function returned this// to equal 414 <- This was the expected result
This is the input "Test.assertEquals(nextBigger(144),414)" , and on my IDE if I test with '144' I get '-1' . Do you think there is an error on the testing from the kata ? or am I missing something ?
You are right, I totally misunderstood. Thank you!
Then you get the same result in your IDE and here, there is a problem with your code, because, you can see the next bigger number you can form with the digits of 144 is indeed 414.
This is the input "Test.assertEquals(nextBigger(144),414)" , and on my IDE if I test with '144' I get '-1' . Do you think there is an error on the testing from the kata ? or am I missing something ?
Pretty sure you're misreading the logs, read this: https://docs.codewars.com/training/troubleshooting/#print-input
based on that error I assume that the input is '414' and I tested and got '441'.
Print the input, what was it?
This comment is hidden because it contains spoiler information about the solution