Domanda di colloquio di Fast Enterprises

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