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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Yes. I guess the fact that there are at least 3 possible reasons is enough to have more "clever" than "best practice" :-)
It's impossible to answer this question, this is just what people voted, each one may have their reason.
This comment is hidden because it contains spoiler information about the solution
Nice; I never saw Result before - thanks for the teaching!
I think this wording could be improved. I understood this rule to mean that the loop wouldn't have 1 follow 9, unless there was a 0. Therefore: 901 would be good, but 912 would not.
A second sentence like this one would help: "a sequence will not roll over after the last digit, so 1 will never follow 0"
k it was a brainfart
This can be checked pretty easily:
Hi,
I tested 8 solutions in python/JS (most upvoted and users I trust about having a proper solution) and they all find 18685 for that input. Now,I'm not entirely sure which one of yours or the translator's solution found 18683 when I read your sentence. Could you clarify, plz?
I was pressing
attempt
multiple times to make sure my code isnt making any very rare mistakes,and I think I found a mistake in the c# translation author's solution.
It thinks that the index of 4949 should be 18685 when its actually two less (18683)
This is really rare and you can easily pass the random tests but i thought id mention it.
that's right :) Thanks
the
?:
operator is useless here. the left of the?
already returns your boolThis comment is hidden because it contains spoiler information about the solution
I spent like 1.5 hours on this and got the shortest solution this kata has so far I think :D
so please press clever on it
Loading more items...