Zearn interview question

if parentheses syntax is closed or not from a given string