Pearl Interview Question

Write program to solve 'Balanced Brackets in an expression' problem?