Given a string s consisting only of parentheses, where s is a valid parentheses string, split s into a concatenation of one or more primitive valid parentheses substrings. For each primitive substring, remove its outermost pair of parentheses, then concatenate the results in the original order. Return the resulting string.
Note: A primitive valid parentheses string is a nonempty valid parentheses string that cannot be written as the concatenation of two nonempty valid parentheses strings.
Constraints:
s.length
s[i] is either '(' or ')'
s is a valid parentheses string
Given a string s consisting only of parentheses, where s is a valid parentheses string, split s into a concatenation of one or more primitive valid parentheses substrings. For each primitive substring, remove its outermost pair of parentheses, then concatenate the results in the original order. Return the resulting string.
Note: A primitive valid parentheses string is a nonempty valid parentheses string that cannot be written as the concatenation of two nonempty valid parentheses strings.
Constraints:
s.length
s[i] is either '(' or ')'
s is a valid parentheses string