Pergunta de entrevista da empresa Intel Corporation

Write a function to determine if a string of parentheses is valid and balanced