Dcastalia interview question

find if a given string is parenthesis balance