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.
a long stream of pointlessly repetitive copy-pasted if statements, gross. it's bad. nobody said it needs to be in one line. the point is to be concise and clean.
oh good, so it's someone else's problem.
I know, and I had already solved it, and it still says there is no solution to show. maybe it doesn't let us see each other's solutions if we wrote them in different languages. it shows my solution when i click on view solution under my comment, but not for you
If you found a bug in the translation of a certain language (and you're certain about it), please raise an
Issue
describing the problem (make sure to mention which language is affected)This feels like it belongs as a 6 kyu kata instead of 4. And also the tests aren't rigorous enough. My solution actually passed before I even checked the horizontal rows.
Still, fun.
I solved it recursively using memoization, but I don't know how to use the BigNumbers module. I just have to figure out how to do that and hten i can submit
what a condescending reply
xdranik, i love your solution. battlerattle I also like the creative thinking of yours even if it isn't efficient.
Damn, is it just me or does it say "there is no solution to show" for all three of you guys? i really would like to see your solution
it says there is no solution to show from yours
this solution passes the test cases but not the specified criteria. the criteria says it should be case-insensitive.
this solution only works for alligator and ALLIGATOR. it would fail if AlLiGaTOR or any other version were tested
is there any reason to use
nth / 10 | 0
instead of
Math.floor(nth / 10)
?
What is the | operator? It looks useful, it's much cleaner than my version where I turn the whole number into a string and loop through each character adding it to a sum.
This was a cool problem to solve. One problem I have with it is that sometimes there is more than one sequence of numbers that sums up to 0, and they might be the same length as each other. And the problem description does not stipulate which sequence to return if that is the case. Other than that, great problem!
IMO it could fit into either of those levels. it's much easier than most level 5 katas.
Loading more items...