Are parentheses within parentheses allowed?


#1

For example:
"(())" == 4
"(()())" == 6


#2

Yes of course, any balanced expression is allowed. By the way, you can click “See expected output” and submit an input for this type of questions.