Freshworks interview question

Check for balanced parentheses in an expression