Pergunta de entrevista da empresa Bonsai AI

Write a function to determine if brackets or parenthesis are balanced.