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.
Preach
That's huge!
+1 Blind4Basics
It works for that particular set of testing cases. Just think what happens if string length is increased...
Solution looks simple (it is pretty straightforward), but it ain't efficient.
It's strange that many people upvoted it.
I didn't mean it. Makes me sad.
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.
Nope, this is an especially inefficient (and actually rather stupid) solution. The time complexity is just very wrong.
This solution is an incredible example of using logic in programming!
F# translation :)
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!
Read that again.
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.
Loading more items...