Meta interview question

Palindrom string and parenthesis balance