Parentheses Grouping
Given a string s containing balanced parentheses "(" and ")", split them into the maximum number of balanced groups.
Constraints
n ≤ 100,000wherenis length ofs.
https://binarysearch.com/problems/Parentheses-Grouping
Examples
Example 1
Input
- s =
()()(()())
Output
- answer =
['()', '()', '(()())']
Leave a comment