title: Change Bits Can Made One Flip
signature: changeBitsCanMadeOneFlip(str) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(bool actual, bool expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(str, bool expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(str), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          "00001", 
          true)
      }");
  
      print("TEST-1...${driver(
          "0000", 
          false)
      }");
  
      print("TEST-2...${driver(
          "11", 
          false)
      }");
  
      print("TEST-3...${driver(
          "111110", 
          true)
      }");
  
      print("TEST-4...${driver(
          "1", 
          true)
      }");
  
      print("TEST-5...${driver(
          "111010111010", 
          false)
      }");
  
      print("TEST-6...${driver(
          "hUInqJXNdbfP", 
          false)
      }");
  
      print("TEST-7...${driver(
          "5191", 
          false)
      }");
  
      print("TEST-8...${driver(
          "1110101101", 
          false)
      }");
  
      print("TEST-9...${driver(
          "NupSrU xz", 
          false)
      }");
  
      return 0;
  }
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 );
  }