title: Find Expression Duplicate Parenthesis Not
signature: function findExpressionDuplicateParenthesisNot($string_arg0) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($string_arg0, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($string_arg0), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        "((a+b)+((c+d)))", 
        true));
      
      printf("TEST-1...%s\n",driver(
        "(((a+(b)))+(c+d))", 
        true));
      
      printf("TEST-2...%s\n",driver(
        "(((a+(b))+c+d))", 
        true));
      
      printf("TEST-3...%s\n",driver(
        "((a+b)+(c+d))", 
        false));
      
      printf("TEST-4...%s\n",driver(
        "(8582007)", 
        false));
      
      printf("TEST-5...%s\n",driver(
        "((a+(b))+(c+d))", 
        false));
      
      printf("TEST-6...%s\n",driver(
        "(PylsShEdKAE)", 
        false));
      
      printf("TEST-7...%s\n",driver(
        "886980680541", 
        false));
      
      printf("TEST-8...%s\n",driver(
        "001", 
        false));
      
      printf("TEST-9...%s\n",driver(
        "jsVmFeOq", 
        false));
      
  }
  
  main();
  ?>
source_py: def find_expression_duplicate_parenthesis_not(string):
      Stack = []
      for ch in string:
          if (ch == ')'):
              top = Stack.pop()
              elementsInside = 0
              while (top != '('):
                  elementsInside += 1
                  top = Stack.pop()
              if (elementsInside < 1):
                  return True
          else:
              Stack.append(ch)
      return False
source_cpp: bool find_expression_duplicate_parenthesis_not(string str) {
    stack < char > Stack;
    for ( char ch : str ) {
      if ( ch == ')' ) {
        char top = Stack . top ( );
        Stack . pop ( );
        int elementsInside = 0;
        while ( top != '(' ) {
          elementsInside ++;
          top = Stack . top ( );
          Stack . pop ( );
        }
        if ( elementsInside < 1 ) {
          return 1;
        }
      }
      else Stack . push ( ch );
    }
    return false;
  }