SurveyMonkey interview question

Matching parenthesis