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.
+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.
That's was in the task:
"All input strings will be nonempty, and will only consist of open parentheses '(' , closed parentheses ')', open brackets '[', closed brackets ']', open curly braces '{' and closed curly braces '}'. "
and MMMAAANNN is right - you can generalize.
Enjoyed the Kata.
Would suggest to add testing with big numbers (over 900000) or add element limit. This would exclude certain solutions.