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.
Hi,
Test case works on my computer but not on the server. It tells me that I need to return -1 when I am returning 0, but in actual fact, I know I am dropping into the condition that returns -1 since I've attached print statements. Any ideas why?
Cool. That's what I thought as well. I always fall into the trap of striving for extremely efficient solutions; should have realised that this has a high lower bound. Thanks for the quick reply!
Azuaron, do you mind stating the time complexity of your solution? I have a vague idea, but I am not too sure.
Still has not been fixed.
Hi Alex, I still do not really get your explanation. How does the bitwise OR help preventing an infinite loop here?
Hi! Yes it is resolved! I don't see any button to resolve it on my end. I think it should be something you do. Am I wrong?
Will be great if there are more test cases.