Zoho interview question

Balanced paranthesis