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.
Not a kata issue ...
@hobovsky it seems you had a typo on your post up there:
It should be 144, not 114.
Your observation is most probably incorrect.
In the example it says that for input
531
, the expected answer is513
.Your error message says that your solution returned
531
, but it should return-1
, but you did not say what was the input number.instresting observation
from the description
next_smaller(531) == 513
from the test
531 should equal -1
why the contradiction?
you failed to test an instance where either a or b could be ""
this helped.
This was insighful
it is called a list comprehension, similar to the lambda function, because of how syntax's can be written on a single line.
[] is used for list comprehension.