<awangdev>1021. Remove Outermost Parentheses_2.java
public String removeOuterParentheses(String S) {
        StringBuilder s = new StringBuilder();
        int count = 0;
        for (char c : S.toCharArray()) {
            if (c == '(' && count++ > 0) s.append(c);
            if (c == ')' && count-- > 1) s.append(c);
        }
        return s.toString();
    }
public String var_0 ( String var_2 ) {
  StringBuilder var_4 = new StringBuilder ( ) ;
  int var_6 = 0 ;
  for ( char var_8 : var_2 . toCharArray ( ) ) {
    if ( var_8 == '(' && var_6 ++ > 0 ) var_4 . append ( var_8 ) ;
    if ( var_8 == ')' && var_6 -- > 1 ) var_4 . append ( var_8 ) ;
  }
  return var_4 . toString ( ) ;
}
