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.
ooo is good code cafoooo
is it only slower because of short circuit evaluation if the first argument is wrong or in other cases as well?
no, it's actually slower than the top one
This should be on top?
Very clever alternative to the and comparison!
It's been changed to 6 kyu some time ago.
agreed. It's too easy for a 4 kyu.
Smart! You made a loop of the function itself! I was already going through the documentation of C# looking where the hell the method 'Factorial' was. Only to find it being the method we worked in... haha
Agreed. This is about on par with most 5 kyu kata that I've done.
What if the input is negative? Looks as though the exit condition would never be met (e.g. squareDigits(-9119)) and it would loop forever.
From what I've seen normally solutions that previously worked are moved to a section called "invalid solutions" but for some reason this kata is not doing it. I suspect it's an issue with codewars itself, and not the specific kata.
Actually I think you can with the 8-kyu katas. Many are possible to complete even if you've never seen the language before and upon completion it's a great learning exercise to consult the other solutions and compare their advanced tricks with your own.
Lol!
Shouldn't this be on higher kyu? Definitely fun but not really on the same par as efficient finding Hammond's numbers for example.
This comment is hidden because it contains spoiler information about the solution
Loading more items...