PayPal interview question

Program to validate paranthesis