title: Quick Way Check Characters String
signature: func quickWayCheckCharactersString(s string) bool {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual bool, expected bool) bool {
      return reflect.DeepEqual(actual,expected)
  }
  
  func driver(s string, expected bool) string {
      if validateSolution(PLACEHOLDER_FN_NAME(s),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver("", true)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver("ggg", true)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver("11", true)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver("KoYIHns", false)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver("232", false)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver("10111000011101", false)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver("DDDD", true)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver("11", true)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver("11111", true)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver("ewJvixQzu", false)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
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;
  }