HomeX interview question

Q) valid strings test (open and close parentheses)