title: Quick Way Check Characters String
signature: quick_way_check_characters_string <- function(s) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(s, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(s), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          "", 
          TRUE
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          "ggg", 
          TRUE
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          "11", 
          TRUE
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          "KoYIHns", 
          FALSE
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          "232", 
          FALSE
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          "10111000011101", 
          FALSE
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          "DDDD", 
          TRUE
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          "11", 
          TRUE
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          "11111", 
          TRUE
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          "ewJvixQzu", 
          FALSE
      )))
  
  }
  
  main()
source_py: def quick_way_check_characters_string(s):
      n = len(s)
      for i in range(1, n):
          if (s[i] != s[0]):
              return False
      return True
source_cpp: bool quick_way_check_characters_string(string s) {
    int n = s . length ( );
    for ( int i = 1;
    i < n;
    i ++ ) if ( s [ i ] != s [ 0 ] ) return false;
    return true;
  }