← 返回 bytedance 的题目列表Remove Extra Parentheses For Valid String
类型:online_judge
Given a string containing extra parentheses, remove the minimum number of invalid parentheses to make the input string valid. Return any valid string. The input string will only contain lowercase characters and parentheses.
Input Example:
'a)b(c)d'
Output Example:
'ab(c)d'
Input Data Constraints:
The length of the string does not exceed 1000.
Example
Input
a)b(c)d