title: Change Bits Can Made One Flip
signature: def changeBitsCanMadeOneFlip(str: String) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Boolean , expected: Boolean): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(str: String, expected: Boolean): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(str),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        "00001", 
        true    
      )}")   
  
  
      println(s"TEST-1...${driver(
        "0000", 
        false    
      )}")   
  
  
      println(s"TEST-2...${driver(
        "11", 
        false    
      )}")   
  
  
      println(s"TEST-3...${driver(
        "111110", 
        true    
      )}")   
  
  
      println(s"TEST-4...${driver(
        "1", 
        true    
      )}")   
  
  
      println(s"TEST-5...${driver(
        "111010111010", 
        false    
      )}")   
  
  
      println(s"TEST-6...${driver(
        "hUInqJXNdbfP", 
        false    
      )}")   
  
  
      println(s"TEST-7...${driver(
        "5191", 
        false    
      )}")   
  
  
      println(s"TEST-8...${driver(
        "1110101101", 
        false    
      )}")   
  
  
      println(s"TEST-9...${driver(
        "NupSrU xz", 
        false    
      )}")   
  
  }
  
source_py: def change_bits_can_made_one_flip(str):
      zeros = 0
      ones = 0
      for i in range(0, len(str)):
          ch = str[i]
          if (ch == '0'):
              zeros = (zeros + 1)
          else:
              ones = (ones + 1)
      return ((zeros == 1) or (ones == 1))
source_cpp: bool change_bits_can_made_one_flip(string str) {
    int zeros = 0, ones = 0;
    for ( char ch : str ) ( ch == '0' ) ? ++ zeros : ++ ones;
    return ( zeros == 1 || ones == 1 );
  }