Minimize length of a given string by removing subsequences forming valid parenthesis
Given a string S consisting of characters '(', ')', '[', ']', '{', '}', the task is to remove all balanced bracket subsequences from the string and print the remaining characters. Examples: Input: S = "((){()({})"Output: "({"Explanation: S[1] and S[2] forms a regular bracket sequence. Therefore, rem