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.
beauty indeed
I also dont understand it
This comment is hidden because it contains spoiler information about the solution
When a string is passed to a boolean evaluation, the empty string '' returns False. Any non-empty string returns True. So "not string" is True if the string is non-empty, False if empty.
What "return not string" mean?
Yeah, this thing is like o(n^2), how does this thing have any best practice votes for it?
time complexity is just awful... ;o
This is a really slick solution. Not only is it readable (for me anyways) its also very short. 10/10
Really very elegant solution.
hehe thats funny, not the best in terms of complexity i think, but still clever:)
Ah yes, I see it now. Very elegant method.
I need to remove all non-parentheses characters for this:
string.replace("()", "")
Oh right, the return not string line only works if the string contained only parens at the start. Nice!
This comment is hidden because it contains spoiler information about the solution
Why do you need the first line of the function definition here? Would this solution not work without first creating a string of only parens? Is it an efficiency thing perhaps?
Loading more items...