Pergunta de entrevista da empresa Accenture

Create a function that checks for balanced brackets.