Pergunta de entrevista da empresa InfluxData

Write a program that takes a string as input and returns true if all the parenthesis are balanced and false otherwise.