Pergunta de entrevista da empresa Airties

For a given string, check if the parentheses in the string match or not.