Akamai interview question

Write a code to check if the parentheses are balanced