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.
Without the input value we can't know if your're right or wrong, probably wrong tho:
Take a look at some failed test:
You can see that your function returned 80532 and the next bigger number with the digits of 80352 is 80523.
Why am i getting error
expected 52398665 to equal 52398566? That doesn't make sense, because 52398566 < 52398665 and we are looking for next bigger, not smaller. Meanwhile my code returns 52938665 which seems like right answer.
No problem, you could try not using sort at all.
I don't see how i can change code to make it work, so i guess i'll just drop this challenge and move on. Thanks for answer
Sort wasn't stable until recent Node's versions, so, either you find a way to make your sort stable or wait for this kata to have newer versions enabled.
You can visualize how it behaves with an older version here: https://pythontutor.com/javascript.html#mode=edit
No one can help you without your code. Read that link about how to post it using markdown formatting.
This comment is hidden because it contains spoiler information about the solution