Pergunta de entrevista da empresa Okta

given a string of alphanumeric characters and parentheses, return a string without unbalanced parentheses