Question d’entretien chez Fast Enterprises

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