title: Find Expression Duplicate Parenthesis Not
signature: function find_expression_duplicate_parenthesis_not(string_arg0)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(string_arg0, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(string_arg0), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver("((a+b)+((c+d)))", true);
      @printf("TEST-0...%s\n",result);
      
      result = driver("(((a+(b)))+(c+d))", true);
      @printf("TEST-1...%s\n",result);
      
      result = driver("(((a+(b))+c+d))", true);
      @printf("TEST-2...%s\n",result);
      
      result = driver("((a+b)+(c+d))", false);
      @printf("TEST-3...%s\n",result);
      
      result = driver("(8582007)", false);
      @printf("TEST-4...%s\n",result);
      
      result = driver("((a+(b))+(c+d))", false);
      @printf("TEST-5...%s\n",result);
      
      result = driver("(PylsShEdKAE)", false);
      @printf("TEST-6...%s\n",result);
      
      result = driver("886980680541", false);
      @printf("TEST-7...%s\n",result);
      
      result = driver("001", false);
      @printf("TEST-8...%s\n",result);
      
      result = driver("jsVmFeOq", false);
      @printf("TEST-9...%s\n",result);
      
  end
  
  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;
  }