Fast Enterprises interview question

How would you implement a program that checked for unbalanced parentheses?