Pergunta de entrevista da empresa OpenTable

Balance parentheses, brackets, braces in a string.