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.
A couple obvious issues here with my own solution. First is that by using reduce I'm not actually breaking out the loop when I detect a closing paren that came before an open paren. This means the the code will run longer than necessary. Also, because I used an arbitrarily large number '100000' to handle this situation, there is the SLIGHT possibility that I could get a false positive.