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.
Wow!
What.
That's huge!
I meant it was a great use of logic in that it took advantage of the fact that there will always be a pair of matching braces/brackets somewhere in the string if the string is "valid" (this is something many people seemed to have overlooked).
I didn't actually bother to look at it's time complexity or anything else.
This solution is an incredible example of using logic in programming!
Ahh... I'm kind of dum sometimes. ;)
My favorite solution! Neat + concise.
This comment is hidden because it contains spoiler information about the solution
This is a great combination of logic and Python shorthand syntax!
The instructions do not explicitly state that the arrays used in the test cases will only contain two unique numbers. It might've taken me much less time (and a very different solution) to solve this kata if I had known this from the beginning.
Blind4Basics... your fork is clever! I looked at eqlion's original solution and thought about optimizing it... then realized my train of thought led right to your fork!
Oh my goodness... I didn't realize the test cases were lists with only two unique numbers... it took me a while to figure out how this solution worked (and to come up with a solution of my own)!
Fellow grammar police agrees.