title: Change Bits Can Made One Flip
signature: changeBitsCanMadeOneFlip :: String -> Bool
  changeBitsCanMadeOneFlip str = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Bool -> Bool -> Bool
  validateSolution actual expected = do
      actual == expected
  
  
  driver :: String -> Bool -> String
  driver str expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME str) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver ("00001") (True) )
  
      printf "TEST-1...%s\n" (driver ("0000") (False) )
  
      printf "TEST-2...%s\n" (driver ("11") (False) )
  
      printf "TEST-3...%s\n" (driver ("111110") (True) )
  
      printf "TEST-4...%s\n" (driver ("1") (True) )
  
      printf "TEST-5...%s\n" (driver ("111010111010") (False) )
  
      printf "TEST-6...%s\n" (driver ("hUInqJXNdbfP") (False) )
  
      printf "TEST-7...%s\n" (driver ("5191") (False) )
  
      printf "TEST-8...%s\n" (driver ("1110101101") (False) )
  
      printf "TEST-9...%s\n" (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 );
  }