Pregunta de entrevista de Fast Enterprises

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