Balancing Parentheses in Your Head
Keep a counter, starting at 0.
Add 1 when you encounted a left parenthesis.
Subtract 1 when you encounter a right parenthesis.
If the counter ever gets negative, failure; if the counter is positive at the end of the expression, failure; else, success.