<awangdev>301. Remove Invalid Parentheses_3.java
private boolean validate(String s) {

        int count = 0;
        for (char c : s.toCharArray()) {
            count += c == '(' ? 1 : 0;
            count -= c == ')' ? 1 : 0;
            if (count < 0) return false;
        }
        return count == 0;
    }
private boolean var_0 ( String var_2 ) {
  int var_4 = 0 ;
  for ( char var_6 : var_2 . toCharArray ( ) ) {
    var_4 += var_6 == '(' ? 1 : 0 ;
    var_4 -= var_6 == ')' ? 1 : 0 ;
    if ( var_4 < 0 ) return false ;
  }
  return var_4 == 0 ;
}
