title: Find Expression Duplicate Parenthesis Not
signature: find_expression_duplicate_parenthesis_not <- function(string_arg0) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(string_arg0, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(string_arg0), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          "((a+b)+((c+d)))", 
          TRUE
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          "(((a+(b)))+(c+d))", 
          TRUE
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          "(((a+(b))+c+d))", 
          TRUE
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          "((a+b)+(c+d))", 
          FALSE
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          "(8582007)", 
          FALSE
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          "((a+(b))+(c+d))", 
          FALSE
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          "(PylsShEdKAE)", 
          FALSE
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          "886980680541", 
          FALSE
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          "001", 
          FALSE
      )))
  
      cat(sprintf("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;
  }