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.
Your input "Hi (there)" is not valid input for this kata. Input consists of only ({[]}) characters
Although inefficient as you need to iterate over the entire vector, it's beautiful!
wow
Very similar to mine, except I prefer only to use arrow functions for super simple one-liner functions.
Love this. One line, easy to read, and probably more efficient than most of the others.
Great solution with explanation how it works.
It does work - it passes the Kata tests. The Kata description could probably have been more explicit taht the string will only contain the characters '(){}[]'.
This won't work correctly on arrays with only negative values (it returns
-1
on[-1,-1]
for example)This comment is hidden because it contains spoiler information about the solution
Nice and simple. I'd prefer a
for_each
instead of the loop, though.