OpenTable interview question

Balance parentheses, brackets, braces in a string.