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.
I don't think you're right. In order to do what you say, you would have to do at least one check (char == ")") for every character, two checks if the character turns out to actually be ")".
So your total number of checks would be [number of characters in the string] + [number of ")" in the string]... while in the original solution it was only [number of characters in the string]