PayPal interview question

Parenthesis validation