Split Parenthesis Sequence into maximum valid Substrings
Given a String S which contains balanced Parentheses Brackets ( i.e '(' and ')' ), we need to split them in such a way that they form the maximum number of balanced groups. Examples: Input: S = "()()(()())()"Output: (), (), (()()), () Input: S = "()()"Output: (), () Input: S = "()()(())"Output: (), (), (()) Approach: To solve the problem follow the