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
You can substitute your first loop to find the highest power with a log3 function.
Why not
if 'loses' in string
?Even better--it's O(1)!
beautiful
Awesome! I had a lot of fun exploring a recursive solution, and even made it into a one-liner!
I can't believe those one-liners actually work!
There's currently only one test case, so my static solution passed...
I don't understand why this isn't a function--the whole point is that I shouldn't have to guess what kind of variables I have to work with. I even submitted a solution
answer = 29
which submitted after a couple tries.No need to add
1
to the max value ofrange()
, since the upper bound is guaranteed not to be in the result.Agreed that this inconcsistency is annoying. I had to make a special case for '0=0' even though the same kind of logic (at least in Python) generates '0 = 0'
So, did I do this right?
I'm not sure what the intention is here: this will still throw an IndexError if len(a) < 2...
My solution shouldn't have passed :)
My comment was for Python, not JS.
Loading more items...