SigTuple interview question

A string problem. To check if the string is balanced (the parenthesis-based problem). Eg. "{{{}}}" is a balanced string, "{{}{}}" is not balanced.