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.
OP solved it, closing
Not an issue
All correct, but the test input is
987654310
.Cheers :)
Hello Giacomo,
Thanks for replying.
I recognise that the instruction states "the next bigger number formed by the same digits" as opposed to "the next bigger number compared to the test input". Even so the next bigger number formed by the same digits as 9876543102 is I believe 9876543120. It uses the same digits as the input and is the next biggest number using those digits. In other words there is a possible combination of the given digits that gives a bigger number which is the next biggest - the number I output is next biggest compared to the input. The "should equal -1" given back as output implies that, using the words in the instructions "no bigger number can be composed using those digits". Besides, in order to make sense of "next" biggest is it not a requirement that "next to what" is known.
Again why does output give: '21' (in single quotation marks) should equal 21 mean?
It is not the next greatest compared to the test input...
You might wish to re-read the tests, as I think the starting number is actually
59884848459853
.Or is there any problem in a specific language?
This comment is hidden because it contains spoiler information about the solution
i have
9 Passed
5 Failed
2 Errors
this means i am close or that tests have bug?
of course you can change number or word. one way or another - but author should not confuse warriors like this. Please solve the issue
Maybe the description means 'berr', instead of 'beer', is different to 'barrel' in 3 letters (adding 'e', 'l' and changing 'e' to 'a')?
The number of shift is determined by the position of the key in the input alphabet. I first thought it's determined by its distance to ascii 'a'. Then I thought it's determined by the unicode distance to the first character in the alphabet. I think it should be put in the description.
Also there's no spec in the description describing what we should do if the key is not in ascii.
you have to remove 'a', 'e', 'l' and replace 'r' with 'e'.
I have solved this kata and correct len for barrel to beer is 4
Loading more items...