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.
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.
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 than2017
, and has exactly same digits, but it is not the next bigger.Finally the next bigger number "after"
2017
is2071
. This is what the kata wants you to find.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
I am going to close this issue as a user error. If you are really, really sure your code is correct, plese post here:
You can also come to
#help-solve
channel of Codewars Discord, someone will definitely help there.Your solution seems to return invalid, too small values:
This does not seem to be the case. After adding logs to your solution, I can see:
Your code does not produce
1234567098
.This comment is hidden because it contains spoiler information about the solution
The kata does not ask about the biggest.
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 ?!
Expected: equal to "theStealthWarrior"
Actual: "theStealthWarrior
I have no idea how to fix this problem or where to even start.
Everything passes except for the randon input, which is [String] instead of String?